-
-
Save yannk/107815 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 @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