in reply to RE: RE: RE: RE: Re: require problems
in thread require problems

Is that a Perl feature or just because whatever the C function that turns strings into number is it likes the fact that it starts with a 0 and doesn't complain about the rest of the string? In which case "0 but" would be OK too?

  • Comment on RE: RE: RE: RE: RE: Re: require problems

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: RE: Re: require problems
by tye (Sage) on Sep 19, 2000 at 22:22 UTC

    The Perl code that converts strings to integers specifically checks for "0 but true". "0 but True" will generate a warning in a numeric context, for example:

    % perl -we "print 0+'0 but True'" Argument "0 but True" isn't numeric in addition (+) at -e line 1. 0 % perl -we "print 0+'0 but true'" 0
            - tye (but my friends call me "Tye")