\cat programming
Perl is a scripting language specialized in text manipulation. I'm not a Perl expert, so I often forget its somewhat cryptic yet efficient syntax. This page will complement my short memory.
=~!? !=~? This is sometimes really confusing. The answer is !~.
sub foo{
my $a = shift;
${@$a}[0] = 2;
}
sub bar{
my $a = shift;
${%$a}{bar} = 2;
}
my @foo;
$foo[0] = 1;
print "$foo[0]\n";
foo(\@foo);
print "$foo[0]\n";
my %bar;
$bar{bar} = 1;
print "$bar{bar}\n";
bar(\%bar);
print "$bar{bar}\n";