Nothing to be surprised at.
Well, it obviously suprised me. Thanks for telling me that this is normal behaviour, and I've done something stupid.
Is that a syntax screw-up on my part then?? In my perl books, the closest syntax I can find is $hash{$key}{'string'} = $value, and that's pretty much what I've always used. I thought maybe the backslashes in the path were what was causing it. I've tried puting quotes around the vars (both single and double), escaping said quotes, and a few different syntaxes using the -> and => operators, etc.... I'm talking desperation stuff.
Could someone at least point me to something that will give my desperation some focus??
Here is an old write-up of mine that uses the same $MAIN::PageInfo{$section}{$pnum} = $_; style of putting things into a hash....
Is this much like the last write-up where something is falling out of scope?
Update
From perldsc -
# reading from file
# flintstones: lead=fred pal=barney wife=wilma pet=dino
while ( <> ) {
next unless s/^(.*?):\s*//;
$who = $1;
for $field ( split ) {
($key, $value) = split /=/, $field;
$HoH{$who}{$key} = $value;
}
That looks like roughly what I have, without the variables localized. I see I initialize $SubOption at the split, but even with that moved to the top of the sub it still fails. |