In Perl, lets say I have the letter A in variable called $character, and I want it to go up to B, how would I do this? The $character can also be numbers (0-8) and I want the method work on both of them? (Something like binary shift, but not exactly sure if it is something like that). Thanks in advance.
In Perl, lets say I have the letter A in variable called $character ,
Share
The increment operator may be what you want. However, do make sure that you want the boundary behavior. For instance:
Produces:
This is the “with carry” from http://perldoc.perl.org/perlop.html#Auto-increment-and-Auto-decrement.