Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: The third 'if'

by arden (Curate)
on Jan 26, 2004 at 18:29 UTC ( #324214=note: print w/replies, xml ) Need Help??


in reply to Re: Re: The third 'if'
in thread The third 'if'

I think your line 38 should be my($text, $value) = split(/:\s*/, $line); instead of my($text, $value) = split(/:\s*/, $_);. It goes back to what Zaxo said about $_ haunting you. :)

Your match in line 39 will be true if there is any digit in $value, if you want for only digits try /^\d+$/ instead, but in your case (where you know $value will have a number in it) you don't actually need that if statement.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2023-05-28 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?