C:\>perl -MO=Deparse -e "print for (1..10);print foreach (1..10);" foreach $_ (1 .. 10) { print $_; } foreach $_ (1 .. 10) { print $_; } -e syntax OK