And another note -- are all the keys unique? Because later ones will over-write earlier ones if they're not...$line = 'key1|value1|key2|value2|'; while ( $line =~ m/([^|]+)\|([^|]+)\|/g ){ $file{$1}=$2; }
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D
In reply to Re: Messing with hashes
by Cody Pendant
in thread Messing with hashes
by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |