use strict; my $countline = 0; my $mytest; open (MYFILE,"<testing.txt")||die "Could not open input file\n"; while($mytest = <MYFILE>) { my @datas= split (/\s+/, $mytest); if ($datas[0] eq "Hello") { $countline++; } my @test1 = $countline; print $test1[0]; }
In reply to help with an array by cravena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |