Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: rtfm

by grinder (Bishop)
on Jun 22, 2004 at 09:42 UTC ( [id://368651]=note: print w/replies, xml ) Need Help??


in reply to rtfm

Heh! This gave me a big laugh (but then that's my sense of humour). On my fifth try I pulled up the perl manpage. How odd.

I would humbly suggest filtering out the directories returned by readdir:

push(@bins, grep { -f $_ } @content);

Normally I would suggest $_ ne '.' and $_ ne '..' but as in this case we don't care to see directories or any other weird things, the -f will do the trick nicely.

Another thing, if system is the last statement in your program you may want to consider execing the program instead, as you really don't need/care to hang around to see what happens.

- another intruder with the mooring of the heat of the Perl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-19 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found