in reply to Return variable hangs script

I don't know what your debug is .. but here's what I always do for stuff like this..
use strict; use warnings; my ($x, $y, $z) = returner(); sub returner { my ($a, $b, $c); # define $a $b and $c # now for something I would throw in just for kicks # just before you return.. defined $a or die("a not defined"); defined $b or die("b not defined"); defined $c or die("c not defined"); return ( $a, $b, $c); }
Something else that might possibly help
use strict; use warnings; my ($x, $y, $z) = @{returner()}; sub returner { my ($a, $b, $c) =( undef, undef, undef); # define $a $b and $c # now we return one value only return [$a, $b, $c]; }

Replies are listed 'Best First'.
Re^2: Return variable hangs script
by joedoc (Initiate) on Jul 03, 2007 at 14:06 UTC
    Thanks for th advice. I'll try that.

    As I said in the original question, this isn't a show-stopper for us. But my curiosity is piqued over why it wouldn't work.

    I'll try and pass along the results.

    Thanks to all for your input!