in reply to Re^4: Arrow operator usage in perl
in thread Arrow operator usage in perl
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!
|
|---|