Unrecognize Character \n

2001-05-02 Thread Kan, Yu-Ting
Dear all, I have setup a Samba Server for the NT to access the Linux server. After the perl program generate some data file in Linux side, the NT server will take this file and display using ASP. The program is I need to use newline (\n)it works well on Linux. But when I use Notepad to view

Re: About "head" and "Tail"

2001-05-02 Thread Tim Scott
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 PROTECTE

RE: Get the result from "system" Call

2001-05-02 Thread Bellenger, Bruno (Paris)
There are several ways to do this : You can try : + # To capture into an array : # note : next line has backticks NOT single quotes. @command_output = `ipconfig 2>&1` ; print "@command_output" ; # then process as standard array. + If you need

Re: About "head" and "Tail"

2001-05-02 Thread Jenda
> 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 te

RE: Get the result from "system" Call

2001-05-02 Thread James . Herbert
The best way to assign the return value of a system call is to use backticks : `hostname` = $hostName; HTH -Original Message- From: yu-ting.kan Sent: 02 May 2001 06:46 To: activeperl Cc: yu-ting.kan Subject: Get the result from "system" Call Dear all, When I am using the "system" c