JamesNC has asked for the wisdom of the Perl Monks concerning the following question:
Thanks, Jamesuse strict; $# = '$%.2f'; #Money format my $amount = 123.2353; my $taxes = $amount * 6 / 100; print "$amount - $taxes = ", $amount-$taxes; print "\n$amount -", " $taxes = ", $amount-$taxes; print "\n$amount -", $taxes," = ", $amount-$taxes; # spaces are ignored! - newline is ignored! print "\n$amount ","-", $taxes," = ", $amount-$taxes; print "\n"," $amount ","-", $taxes," = ", $amount-$taxes; print "\n$amount \-", $taxes," = ", $amount-$taxes; #output #123.2353 - 7.394118 = $115.84 #123.2353 - 7.394118 = $115.84 #123.2353 -$7.39 = $115.84$123.24-$7.39 = $115.84 #$123.24-$7.39 = $115.84 #123.2353 -$7.39 = $115.84
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Odd behavior of $#
by Fletch (Bishop) on Feb 19, 2003 at 18:53 UTC | |
by Mr. Muskrat (Canon) on Feb 19, 2003 at 19:17 UTC | |
by Fletch (Bishop) on Feb 19, 2003 at 20:36 UTC | |
by VSarkiss (Monsignor) on Feb 19, 2003 at 19:52 UTC | |
by diotalevi (Canon) on Feb 19, 2003 at 19:52 UTC | |
by Nkuvu (Priest) on Feb 19, 2003 at 20:37 UTC | |
|
Re: Odd behavior of $#
by hv (Prior) on Feb 19, 2003 at 19:18 UTC | |
by JamesNC (Chaplain) on Feb 19, 2003 at 19:34 UTC |