Created
April 25, 2013 07:19
-
-
Save sioncojp/5458070 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/perl | |
| use warnings; | |
| use strict; | |
| my $profile01 = { | |
| id => 'sion_cojp', | |
| lang => [ | |
| 'perl', | |
| 'bash', | |
| ], | |
| }; | |
| # デリファレンス | |
| # 無名リスト | |
| my $profile02 = ['nobita', 'suneo', 'jaian']; | |
| print "@$profile02\n"; #nobita suneo jaian | |
| print "$profile02->[2]\n"; #jaian | |
| # 無名リファレンス | |
| # 無名ハッシュ | |
| my $profile03 = { | |
| id => 'sion_cojp', | |
| lang => [ | |
| 'perl', | |
| 'bash', | |
| ], | |
| }; | |
| print %$profile03; #langARRAY(0xab0be0)idsion_cojp | |
| print "\n"; | |
| print "$profile03->{id}\n"; #sion_cojp | |
| print "$profile03->{lang}[0]\n"; #sion_cojpperl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment