foreach (@lines) { my @lines1 = split(' ', $_); # $_ is "it" -- the current element of @lines print @lines1,"\n"; }