Kan,

Are you sure $get is set ?

Maybe it's interpreting the expression as 'head -n  $Alarm_File'. Running
with perl -w should tell you whether $get is not initialised at that time,
but won't tell you if it's eq "".

Regards,
Tim

----- Original Message -----
From: "Kan, Yu-Ting" <[EMAIL PROTECTED]>
To: "ActivePerl" <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 3:18 AM
Subject: About "head" and "Tail"


> Dear all,
>
> I encounter fail message when using the head and tail function.
> Is it able to have variables as parameters
>
> the line :
> $result = head -n $get $Alarm_File;
>
> where $get is the number of lines and $Alarm_File is the file name.
> when it execute...error message come "Unrecognized file test: -n at
> GenAlarm.pl line 70."
> Thanks a lot.
> Kan
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activeperl
>

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to