Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Javascript to Perl = fail

by eyepopslikeamosquito (Canon)
on May 05, 2012 at 00:07 UTC ( #969004=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    c = c.charCodeAt(0);
    c++;
    ...
    temp = c;
    c = String.fromCharCode(temp);
    line += c;
    
  2. or download this
    line += String.fromCharCode(c.charCodeAt(0)+1);
    
  3. or download this
    $line .= chr(ord($c)+1);
    
  4. or download this
    use strict;
    use warnings;
    ...
    print "1. line='$line' c='$c'\n";
    $line .= chr(ord($c)+1);
    print "2. line='$line' c='$c'\n";
    
  5. or download this
    1. line='hello' c='A'
    2. line='helloB' c='A'
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2015-07-04 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls