Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

How to split an integer??

by nithins (Sexton)
on Dec 06, 2012 at 10:10 UTC ( [id://1007508]=perlquestion: print w/replies, xml ) Need Help??

nithins has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: How to split an integer??
by tobyink (Canon) on Dec 06, 2012 at 10:26 UTC
      We can also do it in simple manner by using numeric operator for comparison without having regular expression used in the mentioned thread.

        I prefer the regular expression to numeric comparison, because...

        use strict; my $var = "xyz"; print "it's a single-digit number!!\n" if $var < 10;

        Is "xyz" really a single digit number?

        perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1007508]
Approved by nemesdani
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-23 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found