Syntactic Confectionery Delight | |
PerlMonks |
Re^3: Replacing string with regexp without using modulesby almut (Canon) |
on Aug 06, 2008 at 01:58 UTC ( [id://702537]=note: print w/replies, xml ) | Need Help?? |
Could it be the hash reference ...? Yes, in pc88mxer's code, $hash is a hash reference, so it must be dereferenced. In your case, it's a normal hash. So either don't dereference
or create a reference
or even use the normal arrow syntax in both the assignment $hash->{a} = ..., and when you access it $hash->{$1}:
In Section
Seekers of Perl Wisdom
|
|