Last active
February 3, 2018 07:27
-
-
Save note103/487a75c5aedcf085c380cdfacb46a24c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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