Re: Help On Perl Code

2007-04-02 Thread Ravikumar_Tadi
n 4/2/2007 1:24 PM To: arslist@ARSLIST.ORG Subject: Re: Help On Perl Code Good morning, You'd have to format the split builtin differently, and you'd have to escape the |. Furthermore, you'd have to chomp the line before you edit it (there is still a linebreak on the end of t

Re: Help On Perl Code

2007-04-02 Thread Thilo Stapff
The pype symbol is a regex metacharacter. If you want to match a literal "|", you have to escape it with a backslash: @dataarray = split("\|",$Sentance); Ravikumar_Tadi wrote: Hello Listers, I am currntly working on ARS 4.5. Perl script is unable to identify the pipe S

Re: Help On Perl Code

2007-04-02 Thread Michiel Beijen
Good morning, You'd have to format the split builtin differently, and you'd have to escape the |. Furthermore, you'd have to chomp the line before you edit it (there is still a linebreak on the end of the line). $datafile = "test.txt"; open(datafile, "$datafile") || die("Error opening $datafile:

Re: Help On Perl Code

2007-04-02 Thread Dave Saville
On Mon, 2 Apr 2007 11:29:06 +0530, Ravikumar_Tadi wrote: >Hello Listers, > I am currntly working on ARS 4.5. Perl script is unable > to identify the pipe Symbol. > >>>open(Datafile, "$Datfile") || die("data file open failed"); >>>foreach $Sentance () >>> { >>>

Help On Perl Code

2007-04-01 Thread Ravikumar_Tadi
Hello Listers, I am currntly working on ARS 4.5. Perl script is unable to identify the pipe Symbol. >>open(Datafile, "$Datfile") || die("data file open failed"); >>foreach $Sentance () >> { >> >> @dataarray = split("|",$Sentance); >>