in reply to Re: Parsing a table with variable columns on each line
in thread Parsing a table with variable columns on each line
Now available with more punctuation variables:
Update: Edited because I apparently didn't understand the original question. The point of setting $, instead of using join remains.
#!/usr/bin/perl -l use strict; while( <> ) { chomp; local $, = "\t"; my ($name, $val1, $val2, @val3) = split ( "\t" ); print $name, $val1, $val2, $_ for @val3; }
Update: Edited because I apparently didn't understand the original question. The point of setting $, instead of using join remains.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Parsing a table with variable columns on each line
by Anonymous Monk on Oct 26, 2009 at 13:52 UTC |
In Section
Seekers of Perl Wisdom