in reply to Re: VVP:Perl oneliners for Unix commands
in thread VVP:Perl oneliners for Unix commands

buckaduck,

The <Q.PACES*> will work in more instances than anything that that uses shell metacharacters. There are possible two limits you can reach here - the size of the command line your shell can read and two, the maximum number of arguments your exec can handle (getconf ARG_MAX). Most shells will bomb out because you reach the max for the command line buffer (expansion first by shell then exec). For those that don't hard code the cl buffer, you're going to hit the exec max.

The perlfunc:glob function used to use csh to do it's trick but now it uses File::Glob to do it's work. Since that is is based on the bsd glob (man 3 glob) it should work up to your max mem (or there about).

That being said, you do need to be careful using glob and the solutions that minimize memory (find, ls | grep, etc) are probably much better implementations if you're going to be doing a lot of this thing.

-derby