in reply to help with an array

use strict;
use warnings; # as well!
my $countline = 0; my $mytest; open (MYFILE,"<testing.txt")||die "Could not open input file\n";
(A matter of personal preference but
open my $fh, '<', "testing.txt" or die "Could not open input file: $!\ +n";
may be better. Pay attention to all the details...)
while($mytest = <MYFILE>) {
You may want
while( defined($mytest = <MYFILE>) ) {
to be more precise. Which is a good reason IMHO to use Perl's idiomatic
while(<MYFILE>) {
my @datas= split (/\s+/, $mytest); if ($datas[0] eq "Hello")
Incidentally, no need to create the array:
if ( (split /\s+/, $mytest)[0] eq "Hello" )
works just fine. Also, splitting on /\s+/ is actually different from splitting on ' ' (see perldoc -f split) but the latter is in most cases what one really wants, and in fact it is also the default. So, had you also used the topicalizer as hinted above, this may have been just as simple as
if ( (split)[0] eq "Hello" )
and in that case I would have used it as a statement modifier:
$countline++ if +(split)[0] eq "Hello";
my @test1 = $countline; print $test1[0];
Huh?!?

all in all if I understand correctly what that you want to achieve, this may have been just as simple as

while (<>) { push @wanted, $_ if +(split)[0] eq "Hello" }
(but you may also want to chomp.)