Nothing profound here, just some fun syntax tricks for a Friday.
What is the output of the code below, and why?
my $foo = 12_123_1234_12_1; my $bar = "12_123_1234_12_1"; my $baz = 0 + $bar; print $foo, "\n"; print $bar, "\n"; print $baz, "\n";
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fun with Numbers
by Tanktalus (Canon) on Feb 11, 2005 at 21:32 UTC | |
by hardburn (Abbot) on Feb 11, 2005 at 21:46 UTC | |
|
Re: Fun with Numbers
by Joost (Canon) on Feb 11, 2005 at 21:49 UTC | |
by revdiablo (Prior) on Feb 11, 2005 at 22:29 UTC | |
by hardburn (Abbot) on Feb 11, 2005 at 21:53 UTC | |
by Joost (Canon) on Feb 11, 2005 at 22:08 UTC | |
by Tanktalus (Canon) on Feb 11, 2005 at 22:06 UTC | |
|
Re: Fun with Numbers
by Anonymous Monk on Feb 14, 2005 at 11:03 UTC |