in reply to Re^3: remove lending figures
in thread remove lending figures

int( $string > 3 ) should be int( $string ) > 3.

You'll still get the warning unless you turn it off, though.

my $string = "1:00"; if ( do { no warnings qw( numeric ); int( $string ) } > 3 ) { say ">= 4"; } else { say "< 4"; }

It would be clearer to use >= 4 than > 3. And if you do that, you don't even need int.

my $string = "1:00"; if ( do { no warnings qw( numeric ); $string >= 4 } ) { say ">= 4"; } else { say "< 4"; }

Replies are listed 'Best First'.
Re^5: remove lending figures
by frank1 (Monk) on Sep 18, 2025 at 21:20 UTC

    thanks, i appreciate