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

Re: How would you go about it?

by Zaxo (Archbishop)
on Jul 26, 2004 at 00:36 UTC ( [id://377324]=note: print w/replies, xml ) Need Help??


in reply to How would you go about it?

That looks pretty good as it is. The File::Find usage looks fine.

I think your @ARGV handling is unnecessary. You have already arranged for command line options to set the default modes. Those options are removed from @ARGV when Getopt::Long parses them. You could arrange for @ARGV to be a list of directories to apply to if you wished.

Kudos for including a usage function. You may be interested in Pod::Usage. It automatically extracts usage functions from the pod - which I recommend you add to your script. You can then read the pod with perldoc myscript and you can easily extract a man.1 page from your literate perl on installation.

Good work, I wouldn't guess you'd been using perl such a short time.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: How would you go about it?
by pcassell (Sexton) on Jul 26, 2004 at 18:27 UTC
    My @ARGV handling is in case you want to include multiple directories/files on the command line, and I didnt want my script to end nastily if you mistyped a directory or file.

    Thanks for the info on Pod::Usage, I will be checking that out!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found