Dr.Ruud wrote:
> Brad Baxter schreef:
> 
>> perl -F, -lane'print"$F[0],$F[$_]"for 1..$#F;' data
> 
>   perl -F, -lane'print"$F[0],$_"[EMAIL PROTECTED]' data
> 
>   perl -pe'1while s/^((.*?),.*),/$1\n$2,/' data

Very nice.

You can also drop the ^ at the start of your regex.

Rob

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to