Hi,
For anything more complex than a simple script you should
consider using switches and parameters.
You know, something like this [highly dangerous] dd
command:
dd if=/dev/zero of=/dev/hda7 count=1 bs=512
Or:
tar -zxvf archive.tar.gz
Processing these can be quite hard, but guess what... there
is a module to do it for you. Take a look at the
documentation for them at:
perldoc Getopt::Long
perldoc GetOptions
perldoc GetOptions::Std
To do that dd command you'd do _something_ like:
use GetOptions;
my ($if, $of, $bs, $count);
GetOptions("if:s" => \$if,
"of:s" => \$of,
"bs:s" => \$bs,
"count:s" => \$count);
My preference is for Getopt::Long, but didn't fit my
example. Hope you find this useful knowledge, whether or
not it fits in with your current task.
Jonathan Paton
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]