sweetblood has asked for the wisdom of the Perl Monks concerning the following question:
my $tot = sprintf "%lf\n", ($ARGV[0]/$ARGV[1]);
Invalid conversion in sprintf: "%f" at yadayadayada line whatever
Now if I change the line to:
I no longer get the error but I'm not 100% sure I understand the difference. I don't get this error with 5.6.1. This being said, I have 2 questions. What is the difference (if any) between "%lf" and "%f" as a format to (s)printf? And is there a concise document that outlines all the syntactical changes in Perl 5.8? I have read perldelta and I did see a number of things but not specifically this issue. So, it leaves me wondering if there may be other changes not listed in perldelta.my $tot = sprintf "%f\n", ($ARGV[0]/$ARGV[1]);
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntactical changes in Perl 5.8 from 5.6.1
by Anonymous Monk on Oct 10, 2003 at 17:45 UTC | |
by sweetblood (Prior) on Oct 10, 2003 at 18:16 UTC | |
|
Re: Syntactical changes in Perl 5.8 from 5.6.1
by Abigail-II (Bishop) on Oct 10, 2003 at 16:31 UTC | |
by sweetblood (Prior) on Oct 10, 2003 at 17:11 UTC | |
by Abigail-II (Bishop) on Oct 10, 2003 at 17:16 UTC | |
by sweetblood (Prior) on Oct 10, 2003 at 17:46 UTC | |
by Abigail-II (Bishop) on Oct 11, 2003 at 00:38 UTC | |
| |
|
Re: Syntactical changes in Perl 5.8 from 5.6.1
by sgifford (Prior) on Oct 10, 2003 at 16:59 UTC | |
by sweetblood (Prior) on Oct 10, 2003 at 17:14 UTC |