This may be useful:
my $data = do { local $/ = undef; <INFILE> }; my %edit = split /=|\r\n/, $data;
Hashes are almost like arrays with odd element number. Since split is splitting on new lines and = signs, and you appear to have it this way, it will construct the hash for you.
Hope this helps.
Igor 'izut' Sutton
your code, your rules.
In reply to Re^2: How to copy an array to a hash?
by izut
in thread How to copy an array to a hash?
by Ethen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |