-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Side effects of comparison on numeric string's type #475
Comments
From merriam@world.std.comHello again, 1. Thanks for the answer to "$a+++$b" issue. All it needs is 2. It's cool that ++ works on serial number strings. There is $x = "0000"; # ok, a string. and the variants. $x = "0000"; # ok, a string. $x = "0000"; # ok, a string. Why? It doesn't seem like desirable behavior. Thank you again for your patience, Charles Merriam Site configuration information for perl 5.00503: Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration: Locally applied patches: @INC for perl 5.00503: Environment for perl 5.00503: PATH=C:\PERL\BIN;C:\WINDOWS;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\VISUALCAFE\BIN;C:\VISUALCAFE\JAVA\BIN PERL_BADLANG (unset) |
From [Unknown Contact. See original ticket]On Sat, 04 Sep 1999 11:23:53 -0700, C M <merriam@world.std.com> wrote:
That's documented behavior (see perlop.pod): | The auto-increment operator has a little extra builtin magic to it. If
Yes, using $x in numeric context. Maybe you want $y = $x gt "0020"; # no side effect here...
[snip]
I would agree. I don't like this behavior much, but it has been in Perl -Jan |
Migrated from rt.perl.org#1316 (status was 'resolved')
Searchable as RT1316$
The text was updated successfully, but these errors were encountered: