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 \n";
You should output errors STD
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 output if the number of arguments
Hi Indra,
a few comments on your code.
On Wednesday 16 Mar 2011 17:51:19 ind...@students.itb.ac.id wrote:
> Hi, I am Indra. I am new in perl.
>
> I start to run my script :
> ***
> **
>
> #!/usr/bin/perl
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
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
On 11-03-16 12:11 PM, shawn wilson wrote:
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 ] ) )
No, that is correct. In scala
On 3/16/11 Wed Mar 16, 2011 8:51 AM, "ind...@students.itb.ac.id"
scribbled:
>
> Hi, I am Indra. I am new in perl.
>
> I start to run my script :
> **
> ***
> #!/usr/bin/perl -w
>
> $UNFOLD = 1; #1=UN
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
This is your output if the number of arguments is
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 ] ) )