@array = <$fh>; # Reads all lines into array $singleLine = <$fh>; # reads one line only #### my @count = $w =~ /$x/g; my $total = @count;