Hello,
use strict;
use warnings;
Excellent use of those :)
my $file_name="XXXXXXXX.txt";
open(FILE,"$file_name") || die "Not been Accessed";
Good that you checked for failure, why not also report the error ...
Also, don't double quote strings that have nothing to be interpolated or
are just a single variable.
open my $file_fh, $file_name or die "Open $file_name failed: $!";
while (<FILE>) {
print $_ "\n";
}
You're trying to print a newline to the variable $_ which is just wonky :)
while(<$file_fh>) {
print "$_\n"; # or way more ugly and convolutedly: print $_ . "\n";
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>