Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Gulliver (Monk)
on Jul 29, 2011 at 18:11 UTC ( #917511=note: print w/ replies, xml ) Need Help??


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

I didn't say it was a bug. Perhaps you intended to reply to the Anon Poster.

From Programming Perl, 3rd edition:

Whether you use the glob function or the old angle-bracket form, the fileglob operator also does while magic like the line input operator, assigning the result to $_. (That was the rationale for overloading the angle operator in the first place.)

I expected to be able to just put the use File::Glob ':glob' at the top of my existing code to fix the whitespace issue.


Comment on Re^2: File::Glob infinite loop with while loop unlike core glob function
Select or Download Code
Re^3: File::Glob infinate loop with while loop unlike core glob function
by jpl (Monk) on Jul 29, 2011 at 18:30 UTC
    The comment, was, indeed, targeted at the anonymous poster (or anyone else contemplating filing a bug report). I can see where the snippet you quote could be misleading. The glob core function does do "while magic". I suspect that is a decision they wish they could undo.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2014-09-18 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (127 votes), past polls