in reply to Re: Perl script accessing a properties file
in thread Perl script accessing a properties file

Maybe your input file (file.properties) is not what you think it is. Show use a few lines of it.

This works for me:

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
Prints:
name and ant password and gilly level and 5
See also: