Hi,

Try using in the following way,
$DELIM_PIPE = '|';
@data = split /[$DELIM_COMMA]/,$line;

or

@data = split /['|']/,$line;

Regards
Suresh

-----Original Message-----
From: Wil [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 07, 2004 2:39 AM
To: [EMAIL PROTECTED]
Subject: Split the line with "|" character

Dear Folks,

I'm trying to split a line that contains a pipe "|" and I cann't find a
way
how to do it. If i put a back slash "\", it doesn't work either. Can
somebody help me how to do it?
My code is :
while ($line = <FILE>) {
      chomp $line;
      @data = split ("\|",$line);
       ..
    }
Thanks
Wil



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to