in reply to Array values into hash
use Data::Dumper; use strict; undef $/; open(FILE, "<", "test.txt"); $_ = <FILE>; close(FILE); s/\|\n/\,/g;#may need to modify according to newline on your platform, + this is fine with win32 s/\|/=>/g; my $hash ; eval("\$hash = {$_}"); print Dumper($hash);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Array values into hash
by demerphq (Chancellor) on Feb 09, 2003 at 15:09 UTC |