Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: hmmm... copy&paste

...

No Format
$ perl -wle 'print(( "1_000" > 0 )*1)'
Argument "1_000" isn't numeric in numeric gt (>) at -e line 1.
1
$ perl -wle 'print(( "1_000" == 1000 )*1)'
Argument "1_000" isn't numeric in numeric gteq (>==) at -e line 1.
0
$ perl -wle 'print(( "1_000" == 1 )*1)'
Argument "1_000" isn't numeric in numeric gteq (>==) at -e line 1.
1

As the last both commands show will Perl just ignore everything after the underscore, which can lead to unexpected results when comparing numbers. That's the bad news.

...