in reply to Loading 283600 records (WordNet)
Try:
my %hash; my @rec; push @{ $hash{ $rec[0] } }, [ $rec[ 1 ], $rec[ 2 ] ] while @rec = split '(?<=-[a-z])', <>;
Or 25% better still:
my %hash; my @rec; @rec = unpack( 'a10a10a4', $_ ), push @{ $hash{ $rec[0] } }, [ @rec[ 1, 2 ] ] while <>;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Loading 283600 records (Updated)
by remiah (Hermit) on Sep 23, 2012 at 02:28 UTC | |
by BrowserUk (Patriarch) on Sep 23, 2012 at 16:05 UTC | |
by remiah (Hermit) on Sep 23, 2012 at 23:10 UTC | |
by Anonymous Monk on Sep 24, 2012 at 03:57 UTC | |
by remiah (Hermit) on Sep 24, 2012 at 10:31 UTC |