Index . 블로그창고 . Any comments?

\cat programming

Opposite to =~?
Pass-by-reference parameters?

http://www.perl.org

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.

Opposite to =~?

=~!? !=~? This is sometimes really confusing. The answer is !~.

Pass-by-reference parameters?

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";

All the works in this site except software and copyrighted materials by others (e.g., 문학) are licensed under a Creative Commons License. 소프트웨어 및 문학과 같이 다른 이에게 저작권이 있는 작품을 제외하고 모두 크리에이티브 커먼즈 라이센스를 따른다.
Fri Apr 26 05:26:51 2024 . XHTML . CSS (lightbox.css is not part of Uniqki. ;-) . Powered by Uniqki!
refresh . edit . loginout . index