in reply to Adding 2 + 2
$result = 2 + 2; print "the answer is $result\n";
Er.. really? global $result? You don't need that variable:
print "the answer is @{[2+2]}\n";
Works under strict and warnings.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding 2 + 2
by jdporter (Paladin) on Jan 30, 2007 at 17:59 UTC | |
by shmem (Chancellor) on Jan 31, 2007 at 10:24 UTC |