This works for me:
Prints:use warnings; use strict; my %o; while (<DATA>) { $o{$1}=$2 while m/(\S+)=(\S+)/g; print "$1 and $2\n"; } __DATA__ name=ant password=gilly level=5
See also:name and ant password and gilly level and 5
In reply to Re^2: Perl script accessing a properties file
by toolic
in thread Perl script accessing a properties file
by monk monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |