my $num = '5.1'; ## scalar is a string, NOK is false if ($num == 5.1) { print 'It is'; }