Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Don't ask to ask, just ask
 
PerlMonks  

Re^5: Any improvement over the code possible??

by Rohit Jain (Sexton)
on Sep 21, 2012 at 17:42 UTC ( #994958=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Any improvement over the code possible??
in thread Any improvement over the code possible??

OK. got it worked by using the below code: -

use Scalar::Util 'looks_like_number'; my $result = looks_like_number('abc');

Do we have to import functions like this only? Else I have to do it for every function I import??


Comment on Re^5: Any improvement over the code possible??
Download Code
Re^6: Any improvement over the code possible??
by toolic (Chancellor) on Sep 21, 2012 at 17:47 UTC
    Different modules have different requirements, which are usually in the docs:
    By default Scalar::Util does not export any subroutines.

    So, for this module, you must import explicitly. See also perldoc -f use

      Thanks toolic for a valuable information.. :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-04-19 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls