![]() |
|
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?? |
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.
In Section
Seekers of Perl Wisdom
|
|