Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Parsing a table with variable columns on each line

by kikuchiyo (Monk)
on Oct 23, 2009 at 19:56 UTC ( #802962=note: print w/ replies, xml ) Need Help??


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:

#!/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.


Comment on Re^2: Parsing a table with variable columns on each line
Download Code
Re^3: Parsing a table with variable columns on each line
by Anonymous Monk on Oct 26, 2009 at 13:52 UTC
    Thank you. Job is done now.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://802962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2014-07-26 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (179 votes), past polls