use strict; use warnings; use File::Slurp; my @array = read_file("filename"); my $lines = @array; if ( $lines == 1 ) { print "total amount of lines are 1"; } else { print "file has $lines lines"; }
In reply to Re: How to check if a file has more than one line?
by james28909
in thread How to check if a file has more than one line?
by bobo33+
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |