Sep 21, 2005 kl. 9:54 PM skrev John W. Krahn:
Tommy Nordgren wrote:
How do you split a string on the equality character?
Neither split (/=/,$myvar)
nor split ('=',$myvar)
appears to work
How does it not work?
When called with the syntax I've used, it returns a list
containing a single string.
I'll try without the paranthesis.
Can it be that perl treats the entire source text between left and
right paranthesis as a regular expression.
If so, I consider this a bug.
It works for me.
$ perl -le' print for split /=/, "one=two" '
one
two
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>