|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re^2: globing files with spaces problem.by Anonymous Monk |
| on May 08, 2009 at 15:16 UTC ( [id://762851]=note: print w/replies, xml ) | Need Help?? |
|
Hi folks!
I tried with inserting '\' before every space, and it worked! foreach my $dir (glob("*")) { $dir =~ s/ /\\ /g; foreach my $file (glob("$dir/*")) { print "$file\n"; } }
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||