in reply to Re: Perl is ignoring fractional part sometimes
in thread Perl is ignoring fractional part sometimes

As expected, this works

#!/usr/bin/perl -w use strict; my $x = 12; my $y = 14; my $scale = '22.5'; my ($xmax,$ymax,$input); calc(); while(1) { print "Enter X,Y,Scale: "; $input = <>; chomp $input; last if $input =~ m/^\s*$/; ($x,$y,$scale) = split(/\s*,\s*/,$input); calc(); } sub calc { $xmax = $x * $scale; $ymax = $y * $scale; print "$x, $y, $scale, $xmax, $ymax\n"; }

So it's something that Tk is doing to cause the problem