Both split(/\_/, $var) & split ('_', $var) should work. Can we see the rest
of the script, to see what else could be wrong?
|-Original Message-
|From: eric wang [mailto:[EMAIL PROTECTED]]
|Sent: Friday, September 07, 2001 3:39 PM
|To: [EMAIL PROTECTED]
|Subject: spl
put:
abcd
abc
hjdfd
adfadfa
adfadfadf
fadfafd
adfad
Wags ;)
-Original Message-
From: eric wang [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 13:39
To: [EMAIL PROTECTED]
Subject: split on _ and on -
Hi people, just need a quick reference.
how do i split on underscore
On Fri, 7 Sep 2001, eric wang wrote:
> how do i split on underscore?( _ ) and on hyphen? ( - )?
>
> i tried split(/\_/, $var) but didn't work
> and I also tried split ('_', $var) but didn't work also.
You should be able to split directly on _ and - :
$ perl -e '$str =q(a_string); foreach (split
Hi people, just need a quick reference.
how do i split on underscore?( _ ) and on hyphen? ( - )?
i tried split(/\_/, $var) but didn't work
and I also tried split ('_', $var) but didn't work also.
HELP...
Thanks
Eric
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai