in reply to hash/array
sorry if it's more confusing than helpfull but I don't see an easyer way to do that :)#!/usr/bin/perl -w use strict; my $data; # open file open FILE , "< /home/you/your.file"; # extract data and store it in a hash of tables while( <FILE> ) { @_ = split; $_ = shift @_; $data->{$_} = [@_]; } # close file ;) close( FILE ); # display result foreach( keys %{$data}) { print $_ , "\t" , join "\t" , @{$data->{$_}} , "\n"; }
use enlightment; # ( thx clintp :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: hash/array
by clintp (Curate) on Jan 26, 2001 at 03:16 UTC | |
by tilly (Archbishop) on Jan 26, 2001 at 05:40 UTC | |
by malaga (Pilgrim) on Jan 26, 2001 at 10:34 UTC | |
by eg (Friar) on Jan 26, 2001 at 13:01 UTC | |
by Anonymous Monk on Jan 26, 2001 at 23:17 UTC | |
| |
by malaga (Pilgrim) on Feb 02, 2001 at 23:23 UTC |