[Brisbane-pm] Still Struggling With Regex Syntax
martin_jacobs at optusnet.com.au
Sun Apr 15 21:33:48 PDT 2007
I still don't get it (quite).
The story so far...
I have split my rainfall record, and the right-most scalar is $rain.
I now want to make sure that $rain holds a numeric value, without any
whitespace, newlines or other nasties.
If I try
$rain = ($rain =~ m|\d+\.?\d*|);
It returns 1, which, presumably, is the number of times it gets a match.
What's the right syntax for saying 'make $rain contain the numeric
values in $rain"?
Visit my website...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Brisbane-pm