Hi dear Gunnar, Rob, Brad, Ruud, and list: Thank you very much for your great help.
It has been an indescriptible experience seeing how more and more elegant ways of achieving my task were being formulated. Indeed a one-time experience. The previous examples just encourage me to learn every time more of one of the most powerful programming languages: perl. And indeed, this list is a prime example of what "The Programming Republic of Perl" could ever mean: a place where the knowledge can be shared. Thank you very much for your help and support Oh, BTW: the sripts (included the most elegant) run flawlessly over my dataset. Kind regards Erasmo On 12/07/2008, Rob Dixon <[EMAIL PROTECTED]> wrote: > > 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/ > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/