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);
In reply to Re: Array values into hash
by pg
in thread Array values into hash
by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |