Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Isn't glob annoying? (somehow)

by dada (Chaplain)
on Aug 02, 2002 at 11:07 UTC ( #187048=note: print w/replies, xml ) Need Help??


in reply to Isn't glob annoying? (somehow)

as already pointed out, glob isn't strictly supposed to find existing files, but rather to do filenames expansion. however, you can do this to get the result you expect:

@t1 = grep(-e, glob('*1')); @t2 = grep(-e, glob('1')); @t3 = grep(-e, glob('file2')); @t4 = grep(-e, glob('*3'));

cheers,
Aldo

__END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2022-05-25 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?