in reply to Re^2: Elegant way to return true or nothing from a subroutine?
in thread Elegant way to return true or nothing from a subroutine?
givesmy @nums = (-2 .. 2); for my $num (@nums) { printf "!!%2d => %d\n", $num, !!$num; }
!!-2 => 1 !!-1 => 1 !! 0 => 0 !! 1 => 1 !! 2 => 1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Elegant way to return true or nothing from a subroutine?
by ikegami (Patriarch) on Oct 10, 2006 at 16:22 UTC |