sivasakthi wrote:
Hi all,
Hello,
How we can check the argument is passing to the running file or not?
#sample.pl 2008 03
i want to check the two arguments of 2008 & 03 is passed to sample.pl or
not..
@ARGV == 2 or die "You must supply two arguments!\n";
John
--
Perl isn't a toolbox, bu
On Mon, 2008-03-24 at 17:46 +0530, sivasakthi wrote:
> Hi all,
>
> How we can check the argument is passing to the running file or not?
>
> #sample.pl 2008 03
>
> i want to check the two arguments of 2008 & 03 is passed to sample.pl or
> not..
if( defined $ARGV[1] ) {
die "Two arguments re
Arguments are passed in the @ARGV array.
You can access $ARGV[0] and $ARGV[1]
unless (defined $ARV[0] and defined $ARGV[1]) {
die "You need to supply two arguments\n";
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi all,
How we can check the argument is passing to the running file or not?
#sample.pl 2008 03
i want to check the two arguments of 2008 & 03 is passed to sample.pl or
not..
Thanks,