in reply to Bad file slurp or Bad Dumper code?
I am returning a reference to the hash instead. Replace ':' with your delimeter of choice, of course.use strict; my %password = %{ read_passfile('/etc/passwd') }; sub read_passfile { open (PF, shift) or die "Couldn't read password file: $!"; return { map {chomp;split(':',$_,2)} <PF> }; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|