Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
choroba waves is

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-07-24 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (348 votes). Check out past polls.