Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by LanX (Cardinal)
on Aug 02, 2020 at 16:02 UTC ( #11120241=note: print w/replies, xml ) Need Help??


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

> , and generate a "carry" into the next left column (or a new left column character if it's already the leftmost) when they wrap:

Addendum: And the new left column will be of the same "type" like the old leftmost.

# leftmost is ... DB<14> $_="z"; print ++$_ # lowercase aa DB<15> $_="z9"; print ++$_ # ... aa0 DB<16> $_="zZ9"; print ++$_ # ... aaA0 DB<17> $_="Zz9"; print ++$_ # uppercase AAa0 DB<18>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^13: How the auto-increment operator works?
by zapdos (Sexton) on Aug 02, 2020 at 23:26 UTC
    Thank you too brother. ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2020-11-27 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?