2015-04-20から1日間の記事一覧

perl メモ(リファレンス)

#!/usr/bin/perl use strict; use warnings; use 5.010; { # リファレンス my $foo = "foo"; say $foo; # foo my $scalarref = \$foo; say $$scalarref; # foo my $ref = { A => "able", B => [1, 2, 3, 4, 5], }; say "$ref->{A}, @{$ref->{B}}[0..2]"; # a…