On 9/6/06, chen li <[EMAIL PROTECTED]> wrote:
I need a regular expression to process some data but
get stuck. I wonder if anyone here might have a clue.
input:
my $line='group A 1 2 3 4';# separated by space
results:
my @data=("group A ",1,2,3,4);
You barely need a regular expression for this. A split followed by a
join of the first two items would do.
@data = split ' ', $line;
unshift @data, (shift @data . " " . shift @data . " ");
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>