Skip to content

Instantly share code, notes, and snippets.

Created January 9, 2013 00:49
Show Gist options
  • Save anonymous/4489522 to your computer and use it in GitHub Desktop.
Save anonymous/4489522 to your computer and use it in GitHub Desktop.
Is this a Perl bug? (perl --version says: This is perl 5, version 14, subversion 1 (v5.14.1) built for x86_64-linux)
use strict;
use warnings;
use Data::Dumper;
my $things = { foo => bar };
foreach my $word (qw(foo baz bar quux)) {
my $count = grep { defined($_) } $things->{$word};
print "$count\n";
}
print Dumper($params);
__END__
@dstu
Copy link

dstu commented Mar 21, 2013

The Freenode oracle says: no, it isn't. It's Perl's autovivification appearing out of nowhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment