Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: How the auto-increment operator works?

by choroba (Cardinal)
on Aug 04, 2020 at 23:48 UTC ( [id://11120295]=note: print w/replies, xml ) Need Help??


in reply to Re: How the auto-increment operator works?
in thread How the auto-increment operator works?

It's similar to
print ++($foo = 98)
which returns 99. Similarly, in "Zy", it first tries to increment from the right, and y -> z is a valid increment which finishes the operation.

The next word would be AAa, because "z" goes to "a" with a "carry flag", so we need to increment "Z", which goes to "A" with a carry flag, and as there's nothing else to increment to the left, we add "A" (the case is copied from the previous letter).

Wrap means "to start the round from the beginning again" here.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: How the auto-increment operator works?
by zapdos (Sexton) on Aug 04, 2020 at 23:53 UTC
    Thank you very much brother ;-)

Log In?
Username:
Password:

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

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

    No recent polls found