in reply to data extraction from a variable
I'd just do something like:
my ($variable, $first, $second); $variable = some_data_provider(); if ($variable =~ /: ([0-9.]+) ([0-9.]+)/) { ($first, $second) = ($1, $2); print "Found the values $first and $second!\n"; }
...roboticus
Amusing note: I accidentally left off the / in the </code> tag and got one of those horrible-looking newbie posts. I wonder if the newbies are enclosing code in a pair of <code> tags?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: data extraction from a variable
by ikegami (Patriarch) on Jan 29, 2010 at 04:01 UTC | |
|
Re^2: data extraction from a variable
by andrewr (Initiate) on Jan 29, 2010 at 23:23 UTC |