Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks I am trying to monitor a temperature from a temp probe and sound an alarm when its out of range. To capture the output from the temp monitor program i am using a line like this.
$temp = `/usr/local/bin/pcsensor -f`;The output of that program looks like this 2013/12/09 23:00:01 Temperature 71.83F
I want to just capture the temp without the other numbers or any letters. I have looked at sample code snippets but most capture all digits. I don't want the date and time. Anyone willing to help a perl newbie out? Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl extract a specific # from string
by Preceptor (Deacon) on Dec 11, 2013 at 07:01 UTC | |
|
Re: perl extract a specific # from string
by hdb (Monsignor) on Dec 11, 2013 at 07:03 UTC |