http://www.perlmonks.org?node_id=1078620


in reply to A simple backticks question

The for loop iterates a (potentially huge) list returned by the backticks.

If you want to avoid creating that list, you can use open thusly:

open CMD, '-|', 'ls -l' or die $!; while( my $fname = <CMD> ) { chomp $fname; #process the file names one at a time } close CMD;

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.