for (my $i=0;$i < $Numfirst;$i++) { print "Hello $nfirst[$i]\n"; } #### for my $name (@nfirst) { print "Hello $name\n"; }