Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^3: glob behavior

by davido (Archbishop)
on Mar 20, 2012 at 19:23 UTC ( #960637=note: print w/ replies, xml ) Need Help??

in reply to Re^2: glob behavior
in thread glob behavior

Once again you're dealing with different contexts. my $file = glob ... evaluates glob in scalar context, rendering it an iterator function, and my ($file) = glob ... evaluates glob in list context, rendering it a list function that returns a list, which can be empty.


Comment on Re^3: glob behavior
Select or Download Code
Replies are listed 'Best First'.
Re^4: glob behavior
by vagabonding electron (Hermit) on Mar 23, 2012 at 15:38 UTC
    Thank you Dave,
    in fact I did not intend to object but rather to show that I understood the difference now :-)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2016-02-07 02:34 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (241 votes), past polls