Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: globing files with spaces problem.
in thread globing files with spaces problem.

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";
}
}
  • Comment on Re^2: globing files with spaces problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://762851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2026-04-14 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.