Because the | is part of the regex which allows for (a|b|c| which
says if a or b or c.  So what you have is basically I believe null or null
which comes down to split(,$_[1]).  What you want would be to escape the |
like \|, so you would have split(/\|/, $_[1]);

Wags ;) ps My terminology  may not be correct and someone will enlighten us
if it is incorrect.

-----Original Message-----
From: Rowe, Sean D. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 08:53
To: [EMAIL PROTECTED]
Subject: Problem with split


I have a string that is delimited by the '|' character.  I pass this string
to a sub, and within the sub I break it apart using split

        my @Array = split(/|/, $_[1]);

When I print out the array, I find that split has broken the string apart
character by character, and not by the delimiter.  It looks like this:

A

S
T
R
I
N
G

I thought, maybe the the $_[1] string is somehow written with a | after
every character, but I checked and it's not.  I've run out of ideas, and
would appreciate any help.  Thanks!

Sean

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to