in reply to Re^2: postfix "for" question?
in thread postfix "for" question?

This was actually intentional as it looks better:

Karl@h3002993:~$ perl -E 'map {say 1..10} 1..5' 12345678910 12345678910 12345678910 12345678910 12345678910

Or:

karl@h3002993:~$ perl -E 'map {say join " ", 1..10} 1..5' 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10

Compared to:

karl@h3002993:~$ perl -E 'map {say for 1..10} 1..5' 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10

Update: Probably I meant  perl -E 'map {print for 1..10,"\n"} 1..5'

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^4: postfix "for" question?
by ikegami (Patriarch) on Sep 16, 2023 at 22:24 UTC

    This was actually intentional as it looks better

    But the whole question is about nested loops. By changing the code to look different, you completely missed the point.