Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Glob strange behavior

by mobby_6kl (Novice)
on Aug 21, 2006 at 22:22 UTC ( #568700=note: print w/replies, xml ) Need Help??


in reply to Glob strange behavior

I don't usually consider myself qualified to give out perl advice, and after reading your post again I realized you question was why doesn't your code work, and not asking for alternatives. Still, others already responded to that so I'll just offer my alternative using regex:
while (glob '*.pkl') {print qq(Found $1 in $_\n) if /(A[1-9])/}
Do you need it to print which alphanumeric signatures it didn't find? This could be easily added, but it would compromise the cute one-liner aspect. ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2020-10-20 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?