in reply to Re^2: why aren't I see the hash while using dump?
in thread why aren't I see the hash while using dump?
You _can_ typecast, however, like so (array to hash key value pairs)
use Data::Dumper; use warnings; use strict; open FOO, "test_data.txt" or die $!; my @A; while(<FOO>){ chomp; push @A, split /\s*=\s*/, $_, 2 } my %H = @A; print Dumper(\%H);
Included a maximum of 2 elements in the split, as suggested by An.Monk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: why aren't I see the hash while using dump?
by Anonymous Monk on Jun 01, 2015 at 22:27 UTC |