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

Re: 2 basic questions

by choroba (Abbot)
on Apr 29, 2013 at 14:00 UTC ( #1031213=note: print w/ replies, xml ) Need Help??


in reply to 2 basic questions

  1. The string increment is magical, but no other string operations are. Therefore, if you do not want to resort to ord arithmetics, you have to repeat the increment:
    my $check = 'a'; $check++ for 1 .. 5;
  2. TIMTOWTDI. You can for example use substr:
    my $check = 'cd'; substr $check, 0, 1, q();

    Or, use a substitution:

    my $check = 'sp'; $check =~ s/^.//;
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: 2 basic questions
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-07-10 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (198 votes), past polls