in reply to read an integer from a file
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: read an integer from a file
by almut (Canon) on Jun 15, 2010 at 11:43 UTC |