Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: reading output from another script

by jmanning2k (Pilgrim)
on Jul 23, 2003 at 20:10 UTC ( #277321=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # monitor.pl
    while(<>) {
    ...
       if(/warning/) {dosomethingelse($_); }
       print; ## pass on the output
    }
    
  2. or download this
    # monitor.pl
    open(INPUT, "./script |") or die $!;
    ...
      print;
    }
    close INPUT;
    
  3. or download this
    # adapted from Perl Cookbook
    sub filteroutput {
    ...
       }
       exit; #exit forked monitoring process
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://277321]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-01-29 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (74 votes). Check out past polls.

    Notices?