in reply to Re: Float regex matching
in thread Float regex matching

Looks like Perl resolves 0.0 to 0

Replies are listed 'Best First'.
Re^3: Float regex matching
by AnomalousMonk (Archbishop) on Feb 24, 2016 at 16:58 UTC
    ... Perl resolves 0.0 to 0

    As davido points out below, Perl stringizes 0.0 to '0':

    c:\@Work\Perl\monks>perl -wMstrict -le "my $f = 0.0; my $fs = qq{$f}; print qq{stringization of 0.0: '$fs'}; ;; $f = 0.5; $fs = qq{$f}; print qq{stringization of 0.5: '$fs'}; " stringization of 0.0: '0' stringization of 0.5: '0.5'


    Give a man a fish:  <%-{-{-{-<