Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: How can i extract a number from an string

by jplindstrom (Monsignor)
on Jan 22, 2009 at 17:25 UTC ( #738233=note: print w/ replies, xml ) Need Help??


in reply to Re: How can i extract a number from an string
in thread How can i extract a number from an string

/^BS(\d)/ or warn("Invalid frobniz id ($_)\n"), next;

Or possibly die on bad input. Never ignore it.

(And, it's better to be explicit about the loop variable IMHO, $_ is a missed opportunity to write self documented code).

/J


Comment on Re^2: How can i extract a number from an string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-05 04:10 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 (60 votes), past polls