[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [perl] glob() and filenames w/ spaces

>       perl -e 'opendir DIR,".";print join ":",grep/.*/,readdir DIR'

What's the point of the grep() there?  grep /.*/ by definition returns all
elements (since . is 'any character' and * is 'zero or more of them').

Andrew J Perrin - Ph.D. Candidate, UC Berkeley, Dept. of Sociology  
(Soon: Asst Professor of Sociology, U of North Carolina, Chapel Hill)
andrew_perrin@unc.edu - http://www.unc.edu/~aperrin

Reply to: