I'm trying to adopt a script to pull data from water tank gaguges, the
original script had like below to deal with a single gauge:

------------------
while (1) {
        my $gotit = "";
        until ("" ne $gotit) {
                $gotit = $port->lookfor;       # poll until data ready
                sleep 1;                          # polling sample time
        }

      $gotit =~ /a(\d+)b\dc(\d+)/;
-----------------
I have two gauges, so they output like so:

---
a1566b0c203d1477e0f205g
where 156.6 is the depth of tank1 in cm, 0 is the temperature sign bit,
20.3 is the air temperature at tank 1 in C, etc.
---
I've tried
        $gotit =~ /a(\d+)b\dc(\d+)d(\d+)e\df(\d+)/;
and
        $gotit =~ /a(\d+)b\dc(\d+)d(\d+)e\df(\d+)g/;

but I'm not getting it

-- 
Voytek

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to