Re: how do check th argument is passing to running file

2008-03-24 Thread John W. Krahn
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

Re: how do check th argument is passing to running file

2008-03-24 Thread ken Foskey
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

Re: how do check th argument is passing to running file

2008-03-24 Thread yitzle
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/

how do check th argument is passing to running file

2008-03-24 Thread sivasakthi
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,