Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: File::Glob infinite loop with while loop unlike core glob function

by jpl (Monk)
on Nov 02, 2011 at 12:54 UTC ( #935382=note: print w/ replies, xml ) Need Help??


in reply to File::Glob infinite loop with while loop unlike core glob function

For the benefit of anyone stumbling across this item in the future, there are several fixes being installed in the 5.16 release. The ':glob' tag has been removed from the synopsis and is actively discouraged in the documentation. Tag ':bsd_glob' will serve many of the same useful purposes, without the risk of infinite looping.

The discussion among the perl porters brought to light another alternative for globbing file names with embedded blanks. The <> operator usually embraces barewords. If it embraces a quoted string, splitting does not occur on blanks; they are treated as ordinary characters. So

while (<"em bedded/name*">} { print "$_\n"; }

would have done what the OP wanted, without the need for File::Glob.


Comment on Re: File::Glob infinite loop with while loop unlike core glob function
Download Code
Re^2: File::Glob infinite loop with while loop unlike core glob function
by Anonymous Monk on Mar 20, 2012 at 08:53 UTC

    would have done what the OP wanted, without the need for File::Glob.

    Its funny, that piece of code is implemented using glob/File::Glob

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2014-09-18 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (111 votes), past polls