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
|