The chomp is necessary because your input will have a trailing newline which is not in the file name.my $filename = <>; chomp $filename; open(FILE,"<", $filename) or die "Open failed for $filename: $!"; + my @lines=<FILE>;
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^5: user input file
by kennethk
in thread user input file
by torres09
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |