Created
February 13, 2014 01:32
-
-
Save tsucchi/8968094 to your computer and use it in GitHub Desktop.
scalar contextだと思ってた...
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/env perl | |
| use strict; | |
| use warnings; | |
| my $aa = { | |
| aa => hoge(), | |
| bb => 'xxx', | |
| }; | |
| sub hoge { | |
| return ; | |
| } | |
| use Data::Dumper; | |
| warn Dumper($aa); | |
| # => Odd number of elements in anonymous hash at test.pl line 5. | |
| # $VAR1 = { | |
| # 'aa' => 'bb', | |
| # 'xxx' => undef | |
| # }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment