in reply to Re: Emoji Progress Spinners
in thread Emoji Progress Spinners

G'day pme,

Thankyou for your excellent question. Those of us who've been coding Perl for a quarter of a century or more, may often rely upon muscle memory rather than using any actual brain cells. When I start a new script, I often find that I've witten

#!/usr/bin/env perl use strict; use warnings;

before I've even thought about the problem.

Any Perl function that has function LIST can be expanded using function function-returning-list LIST. This is pretty much what 🦛 says.

Many commands allow the use of $_, check the documentation.

Hopefully, combined with other responses, that answers your question. Of course, if anything is still unclear, ask for further clarification.

— Ken

Replies are listed 'Best First'.
Re^3: Emoji Progress Spinners
by pme (Monsignor) on Feb 07, 2021 at 20:42 UTC
    Thank you all for your answers. Meanwhile I found answer myself to my question.
    @a2 = map chr hex, @a1;
    can be written as
    @a2 = map chr(hex()), @a1; # or @a2 = map chr(hex($_)), @a1;
    And the original syntax can be used in a simple assignment statement like this.
    $x = char hex 41; # which means $x = 'A';