"be consistent" | |
PerlMonks |
Re: How would you go about it?by Errto (Vicar) |
on Jul 26, 2004 at 01:58 UTC ( [id://377335]=note: print w/replies, xml ) | Need Help?? |
If I'm reading it right I think you have a small bug: usagedie() if (!-f || !-d); should probably be usagedie() if (!-f && !-d); Otherwise that line will always call usagedie() if passed an argument. Quite well-written, though. My only nits are that you should validate that the numbers you're passed are actually valid file modes (otherwise they just become 000, which is not what you want), and that you probably don't need to set $opts{directory} since that's not a command-line option.
In Section
Seekers of Perl Wisdom
|
|