Please always check that you can open the file. Then you should chomp:use strict; use warnings;
open (MYFILE, "status2.txt") or die "Unable to open status2.txt: $!"; my $a = <MYFILE>; chomp $a;
In reply to Re: read an integer from a file
by cdarke
in thread read an integer from a file
by long
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |