plendid has asked for the wisdom of the Perl Monks concerning the following question:
I'm attempting to list all the filenames found in 94 volumes . This is easy to do within a Perl program,
use File::Find::Rule; foreach (0..93) {print File::Find::Rule->new->file->in("/.mnt.$_")}
which yields lots of file-names. But when i attempt to execute this code as a one-liner,
perl -m-File::Find::Rule -e "foreach (0..93) {print File::Find::Rule->new->file->in(qq(/.mnt.$_))}"i get nothing.
I looked at perlrun but didn't get a clue. And this particular problem seems hard to look up. I suspect the fault is mine, not understanding the nuances of Perl one-liners. The code itself is a greatly simplified version of my real program. The reason for preferring one-lining is that the code is executed via ssh.
Thanks for whatever help you can provide.
|
|---|