Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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
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
    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 avoiding work at the Monastery: (9)
As of 2015-07-30 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls