Another possible method (borrowed from "Perl for System Administrators"):
my %info = split /,|\n/, $txt;
This will possible fail if the second field has comma. Maybe we can work it out to prevent that :-)
Igor 'izut' Sutton
your code, your rules.
In reply to Re^2: Using Split to load a hash
by izut
in thread Using Split to load a hash
by Grey Fox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |