in reply to Removing delimiters
You could use the following:
Untested code, but hope it helps,my $readline = "perl::monk"; my ( $first, $second ); # this will get the first item... ( $first, undef ) = split /::/, $readline, 2; # or the second one... ( undef, $second ) = split /::/, $readline, 2;
Update: removed the type in the second rule... I need more coffee...
-- JaWi
"A chicken is an egg's way of producing more eggs."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Removing delimiters
by DaveH (Monk) on Feb 04, 2003 at 08:28 UTC | |
by JaWi (Hermit) on Feb 04, 2003 at 08:35 UTC |
In Section
Seekers of Perl Wisdom