in reply to Re: read an integer from a file
in thread read an integer from a file

Then you should chomp

== should work without chomping (while $a eq "0" would not):

my $a = "0\n"; print "is zero\n" if $a == 0;