Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Numification of strings

by Marshall (Abbot)
on Aug 02, 2010 at 13:47 UTC ( #852472=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #include <stdio.h>
    #include <stdlib.h>
    ...
               there are either no digits or non-digits
       case c) a null string results in 0
    */
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $a = "23B";
    $a +=0;
    print $a;
    
  3. or download this
    my $x = "00012";
    print "$x\n";
    ...
    ##prints
    #00012
    #12
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://852472]
help
Chatterbox?
[LanX]: well as long as they are your *own* testicles...
[Discipulus]: oh and only with your left hand!
LanX is relieved!
marto wonders what the hell people are talking about
[LanX]: oh 9 downvotes ... Nick must be back :)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-04-26 10:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?