in reply to Re^3: adding an IF to a push
in thread adding an IF to a push
But after playing through numerous attempts, I couldn't pull it off. I just figured you should be able to test the return of a sub this way, though I've never thought of trying it until now.my $num = 5; if (\&add($num) { .. } sub add { my $shift = shift; my $num2 = 10; my $sum = $num1 + $num2; if ($sum == "15") { return 1; } else { return 0; } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: adding an IF to a push
by ikegami (Patriarch) on Jun 28, 2006 at 05:15 UTC | |
by sulfericacid (Deacon) on Jun 28, 2006 at 05:30 UTC |