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 (<Datafile>) >>> { >>> >>> @dataarray = split("|",$Sentance); >>> print "$dataarray[0]\n"; >>> print "$dataarray[1]\n"; >>> print "$dataarray[2]\n"; >>> >>>} >>>close(Datafile); >>> >>>Where $Senctence = ABC|DEF|GHI >>> >>>When i run this the result is: >>>A >>>B >>>C >>> >>>But expected result is : >>> >>>ABC >>>DEF >>>GHI > >Seems If I replace pipe with " , " ( with comma) it is working. >Please help in this regard ASAP>
On opens you need "or" not pipe - Different level of binding. open FILE, $filename or die "Can't open $filename $!\n"; HTH -- Regards Dave Saville _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the Answers Are"