Ah! The subroutine only returns a hash reference, like the following:
use strict; use warnings; use Data::Dumper; my $hashRef = getHashRef(); print Dumper \$hashRef; print $hashRef->{'Hello'}; sub getHashRef { my $hwwns; $hwwns->{'Hello'} = 'world!'; return $hwwns; }
Output:
$VAR1 = \{ 'Hello' => 'world!' }; world!
In reply to Re^5: Arrow operator usage in perl
by Kenosis
in thread Arrow operator usage in perl
by dvinay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |