in reply to Did I get what I expected (an array)?
If you ever start using modules for this sort of thing I highly recommend any of the Test modules and for context issues the marvellous Want.use strict ; use warnings ; sub test { return wantarray ? qw(test) : scalar @{[qw(test)]}; } my $test = test() ; my @test = test() ; print ">>> $test\n" ; print map "[$_]\n",@test ; print $test == scalar(@test)? "Yepa!\n" : "Nope!\n" ; __output__ >>> 1 [test] Yepa!
_________
broquaint
|
|---|