Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Newbie Tainted glob question

by Albannach (Monsignor)
on Oct 24, 2001 at 20:35 UTC ( [id://121174]=note: print w/replies, xml ) Need Help??


in reply to Newbie Tainted glob question

I don't have 5.005 handy for testing but perhaps this will work:
opendir(DIR, '/var/www/htdocs') or die $!; my @entries = grep{/.*\.html$/} readdir(DIR); closedir(DIR);
Update: or do this properly as chipmunk suggests (my die was also added later - you'd think I'd learn to be more careful when pasting from a 1-liner test...)

--
I'd like to be able to assign to an luser

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-25 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found