Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Loop Break

by ww (Archbishop)
on Jan 19, 2012 at 16:33 UTC ( #948811=note: print w/replies, xml ) Need Help??

in reply to Re^2: Loop Break
in thread Loop Break

++ for your reply, JavaFan because I was misreading this (from the glob doc you cited):
Note that "glob" splits its arguments on whitespace and treats each segment as separate pattern. As such, "glob("*.c *.h")" matches all files with a .c or .h extension. The expression "glob(".* *")" matchs all files in the current working directory.

Nothing there bars this:

#!/usr/bin/perl use Modern::Perl; my @arr = glob("*.*"); for my $line(@arr) { say $line; }

Also, as noted by Corion, perlop is relevant.

If what the angle brackets contain is a simple scalar variable (e.g., +<$foo>), then that variable contains the name of the filehandle to in +put from, or its typeglob, or a reference to the same. For example: $fh = \*STDIN; $line = <$fh>; If what's within the angle brackets is neither a filehandle nor a simp +le scalar variable containing a filehandle name, typeglob, or typeglo +b reference, it is interpreted as a filename pattern to be globbed, a +nd either a list of filenames or the next filename in the list is ret +urned, depending on context.

Above blockquote added as an update, for future readers

TY, both!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://948811]
[thezip]: I can always tell when the dogs have been mousing, as there is a concentric ring of mud around the end of their snouts when they do.
[thezip]: As for more physical evidence, that always seems to be missing somehow
[Rabbi Bob]: We have a Jack Russell: off the leash she is a torpedo against mice, rats, chipmunks and squirrels
[Rabbi Bob]: Doesn't eat them, just snaps, kills, drops and moves on.
[thezip]: Efficient, that one.
[erix]: my dog could do the classic mouse jump (never caught a mouse :)
[erix]: he caught a hare once (must have been a young one...)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2017-11-17 20:01 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (272 votes). Check out past polls.