Skip to content

Instantly share code, notes, and snippets.

@tsucchi
Created February 13, 2014 01:32
Show Gist options
  • Select an option

  • Save tsucchi/8968094 to your computer and use it in GitHub Desktop.

Select an option

Save tsucchi/8968094 to your computer and use it in GitHub Desktop.
scalar contextだと思ってた...
#!/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