Capturing parameters passed to a perl-script on Windows is done using the
special @ARGV variable.
@ARGV can be checked to see how many parameters were passed to your script,
easily by doing so:
die "blah blah blah " unless @ARGV == 2;
This will make your script die with a message unless there were two
parameters passed to your script from the command line.
If you want to access the actual values of the @ARGV it's done something
like so:
my $first_param = $ARGV[0];
my $second_param = $ARGV[1];
You could also "shift" them in:
my $first_param = shift;
my $second_param = shift;
Hope this will help you out!
/Freddy
----- Original Message -----
From: "Mark Weisman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 04, 2003 10:18 AM
Subject: Capturing passed Parameters?
How do you capture passed parameters in Perl on Windows? In regular perl
its:
$variable = param('passed');
However, when I tried to run that under windows, it dies a horrible
death? I've looked through perl.org for more information about
converting over my unix scripts to windows, any other good places out
there for information?
Sincerely in Christ,
Mark-Nathaniel Weisman
President / Owner
Outland Domain Group Consulting
Anchorage / Washington DC / Bellevue
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]