- or download this
use strict;
- or download this
use warnings; # as well!
- or download this
my $countline = 0;
my $mytest;
open (MYFILE,"<testing.txt")||die "Could not open input file\n";
- or download this
open my $fh, '<', "testing.txt" or die "Could not open input file: $!\
+n";
- or download this
while($mytest = <MYFILE>) {
- or download this
while( defined($mytest = <MYFILE>) ) {
- or download this
while(<MYFILE>) {
- or download this
my @datas= split (/\s+/, $mytest);
if ($datas[0] eq "Hello")
- or download this
if ( (split /\s+/, $mytest)[0] eq "Hello" )
- or download this
if ( (split)[0] eq "Hello" )
- or download this
$countline++ if +(split)[0] eq "Hello";
- or download this
my @test1 = $countline;
print $test1[0];
- or download this
while (<>) { push @wanted, $_ if +(split)[0] eq "Hello" }