Re: ARGV Error

2011-03-16 Thread John W. Krahn
Shlomi Fish wrote: On Wednesday 16 Mar 2011 17:51:19 ind...@students.itb.ac.id wrote: if(@ARGV != 1){ 1. There should be a space before the "{". There could be, but there doesn't have to be. print "ARGV error \n"; print "firstradar velx vely \

Re: ARGV Error

2011-03-16 Thread John W. Krahn
Olof Johansson wrote: On 2011-03-16 22:51 +0700, ind...@students.itb.ac.id wrote: if(@ARGV != 1){ print "ARGV error \n"; print "firstradar velx vely \n"; exit(1); } ... I got this error message : ARGV error firstradar velx vely This is your out

Re: ARGV Error

2011-03-16 Thread Shlomi Fish
"../volume"; > $year= "2011"; 1. Add my. 2. Maybe use http://perldoc.perl.org/File/Spec.html > > if(@ARGV != 1){ 1. There should be a space before the "{". > print "ARGV error \n";

Re: ARGV Error

2011-03-16 Thread Olof Johansson
On 2011-03-16 17:13 +0100, Olof Johansson wrote: > This is your output if the number of arguments isn't what you > expected. Guessing from > > print "firstradar velx vely \n"; > > you probably want to change > > if(@ARGV != 1){ > > to > > if(@ARGV != 2){ > > as @ARGV is a list and lists

Re: ARGV Error

2011-03-16 Thread Jim Gibson
On 3/16/11 Wed Mar 16, 2011 9:11 AM, "shawn wilson" scribbled: > On Mar 16, 2011 11:53 AM, wrote: >> >> >> if(@ARGV != 1){ >> > > I don't think you can look at an array like its a string like that. > Maybe string( @ARGV ) != 1 might work. But what you probably want is: > If( defined( $ARGV

Re: ARGV Error

2011-03-16 Thread Shawn H Corey
. In scalar context, @array is the number of items in the array. The problem is that the OP is running the script without any arguments. On 11-03-16 11:51 AM, ind...@students.itb.ac.id wrote: > if(@ARGV != 1){ > print "ARGV error \n"; > print "firstradar

Re: ARGV Error

2011-03-16 Thread Jim Gibson
n/perl -w > > $UNFOLD = 1; #1=UNFOLD^[$B%G!<%?$r;HMQ^[(B > 0=^[$B@8^[(Bvolume^[$B%G!<%?$r;HMQ^[(B > $XDR_NUM = 1; #1=^[$BJRJ}$N$_^[(BCAPPI^[$B$r:n@.^[(B > 0=^[$BN>J}$N^[(BCAPPI^[$B$r:n@.^[(B > > # work directory # > $workdir = ".."; > $datadir = &quo

Re: ARGV Error

2011-03-16 Thread Olof Johansson
Hi Indra, On 2011-03-16 22:51 +0700, ind...@students.itb.ac.id wrote: > if(@ARGV != 1){ > print "ARGV error \n"; > print "firstradar velx vely \n"; > exit(1); > } ... > I got this error message : > ARGV error > firstradar velx vely Th

Re: ARGV Error

2011-03-16 Thread shawn wilson
On Mar 16, 2011 11:53 AM, wrote: > > > if(@ARGV != 1){ > I don't think you can look at an array like its a string like that. Maybe string( @ARGV ) != 1 might work. But what you probably want is: If( defined( $ARGV[ 0 ] ) )

ARGV Error

2011-03-16 Thread indrag
JRJ}$N$_^[(BCAPPI^[$B$r:n@.^[(B 0=^[$BN>J}$N^[(BCAPPI^[$B$r:n@.^[(B # work directory # $workdir = ".."; $datadir = "../volume"; $year= "2011"; if(@ARGV != 1){ print "ARGV error \n"