Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/perl
use warnings;
use strict;
my @a = mysub();
my %hash = (
foo => scalar( my @b = mysub() ),
bar => scalar @a,
baz => scalar( mysub() ),
boo => scalar(@{[ mysub() ]}),
);
sub mysub {
print "wantarray(): " . wantarray() . "\n";
return ( 'bar', 'baz', 'blah' );
}
use Data::Dumper;
print Dumper(\%hash);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment