#!/usr/local/bin/perl -w
use strict "vars";
use strict "subs";
sub inter(\%) {
printf "$_[0]\n";
printf "@_\n";
printf "$_[0]->{a}\n";
printf "$_[0]{a}\n";
}
printf "ONE\n";
my %c = (a=>"a",b=>"b");
inter(%c);
printf "TWO\n";
my $ref = "inter";
$ref->(%c);
printf "THREE\n";
$ref->(\%c);
####
ONE
HASH(0x622430)
HASH(0x622430)
a
a
TWO
a
a a b b
Use of uninitialized value in concatenation (.) or string at /home/smk/prog/pl/interesting.pl line 10.
Use of uninitialized value in concatenation (.) or string at /home/smk/prog/pl/interesting.pl line 11.
THREE
HASH(0x622430)
HASH(0x622430)
a
a
####
inter(%c)
####
inter(\%c)
####
Type of arg 1 to main::inter must be hash (not reference constructor) at /home/smk/prog/pl/interesting.pl line 18, near "%c)"
Execution of /home/smk/prog/pl/interesting.pl aborted due to compilation errors.