perl -e 'print "$_\n" for (1..10)'
With perl -e '...'
we execute the specified Perl command.
print "$_\n" for (1..10)
in Perl prints the numbers 1, 2, ..., 10 with a newline character appended at the end, so one number per line.
for ((i=1; i<=10; ++i)); do echo $i; done