Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Emoji Progress Spinners

by kcott (Archbishop)
on Feb 07, 2021 at 19:06 UTC ( [id://11128028]=note: print w/replies, xml ) Need Help??


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';

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11128028]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found