Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 chilling in the Monastery: (4)
As of 2014-12-20 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls