Friends, I have a gizmo a vk011 , http://www.qkits.com/serv/qkits/diy/pages/VK011.asp that connects to my serial port , I can speak to it with minicom. ( i am on centOS5.3 ) and it spits out a string. Sensor 1 +72.38 DegF Hi +77.56 DegF Low +29.75 DegF , it does this over & over. What I would like to be able to do is. Capture that string into a var $spitout. parse $spitout for the num that is the temp ( ie: 72 ) and put that into a var $temp and if temp is greater than ...80 then send an email. content of the email would be $spitout. so -- i can write send an email with perl , and I can evaluate 2 numbers with perl....into an if that will send the email... But I am unable to snag this output into any form I have read that my com port can be treated as a file cat dev/tty0 > a file but I cannot make that work I wonder if what I am trying is impossible or if there is a way to ' read ' and evaluate the output of the dev/stty0 and if a inString num is greater that another num do something. First I have to be able to ' get a hold ' of the info that i can see in the terminal win. thanks

In reply to parse output from a com device by zimbot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.