in reply to postfix "for" question?
I wouldn't expect ChatGPT to generate valid Perl; it's hard enough for human beings to do that without knowing Perl.
do { CORE::say $_ for 1 .. 5 } for 1 .. 10;
You could try that. I wouldn't. But you could.
Edit: Even more convoluted: do { CORE::say $_ for 1 .. $_ } for 1 .. 10;. I guess tinkering like this helps figure out how context and loops work, if that's the goal.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: postfix "for" question?
by misterperl (Friar) on Sep 11, 2023 at 16:11 UTC | |
by hippo (Archbishop) on Sep 11, 2023 at 18:13 UTC | |
by tybalt89 (Monsignor) on Sep 11, 2023 at 19:11 UTC | |
by Fletch (Bishop) on Sep 11, 2023 at 20:27 UTC | |
by tybalt89 (Monsignor) on Sep 11, 2023 at 22:13 UTC |