Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: When you first encountered Perl, which feature amazed you the most?

by wisgest (Initiate)
on Mar 27, 2025 at 00:51 UTC ( [id://11164459]=note: print w/replies, xml ) Need Help??


in reply to When you first encountered Perl, which feature amazed you the most?

Slices.

For example, let @f and @g contain permutations of the numbers 0..$#f. Then the product (composition) of these permutations can be obtained in one step as @f[@g].

It is also easy to obtain the inverse permutation (swap indices and values):
@h[@f] = 0..$#f
(if there is no need to keep the source permutation, then @f itself can be used instead of @h).

Assignment operators as lvalues.

I've always wanted to have in a programming language the ability to do something like this:
($x += 2) *= 3

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2026-04-11 04:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.