Skip to content

Instantly share code, notes, and snippets.

@note103
Last active February 3, 2018 07:27
Show Gist options
  • Save note103/487a75c5aedcf085c380cdfacb46a24c to your computer and use it in GitHub Desktop.
Save note103/487a75c5aedcf085c380cdfacb46a24c to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
my @dog = ( 'shiba', 'bulldog' );
my @cat = ( 'mike', 'abyssinian' );
my @bird = ( 'eagle', 'crow' );
my @animal = (\@dog, \@cat, \@bird);
print ${$animal[2]}[0]."\n"; #原形
print $animal[0]->[1]."\n"; #アローを使ったところ
print $animal[1][0]."\n"; #アロー省略
__END__
eagle
bulldog
mike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment