c4onastick has asked for the wisdom of the Perl Monks concerning the following question:
| Data Set 1 | Data Set 2 | Data Set 3 | |||
| X units | Y units | X units | Y units | X units | Y units |
| x1 | y1 | x1 | y1 | x1 | y1 |
| x2 | y2 | x2 | y2 | x2 | y2 |
| x3 | y3 | x3 | y3 | x3 | y3 |
| ... | ... | ... | ... | ... | ... |
use warnings; my %data_sets; while(<>){ # I did the $line thing because there's some garbage at the top of +the file that I don't want my $line++; if($line == 2){ while(/\G([^\t]+)/g){ $data_sets{$_} = {}; } } if($line > 3){ $data_sets{}; #<- ran into the problem right here! The script do +esn't know what data set its on! }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help munging tabular data
by BrowserUk (Patriarch) on Aug 02, 2007 at 00:13 UTC | |
|
Re: Help munging tabular data
by GrandFather (Saint) on Aug 02, 2007 at 00:58 UTC | |
by aquarium (Curate) on Aug 02, 2007 at 04:21 UTC | |
|
Re: Help munging tabular data
by aquarium (Curate) on Aug 02, 2007 at 00:13 UTC | |
|
Re: Help munging tabular data
by Cristoforo (Curate) on Aug 04, 2007 at 03:42 UTC |