here's the code, #!/usr/bin/perl

use strict;
use warnings;

my($temp,$fh);
$temp = "";
if(open($fh, "-|")){
while( < $fh > ){ $temp.= $_; }
close($fh);
open($fh, ">> /LogsEM/Log.txt");
flock($fh, 2);
print $fh "seg 1 ".$temp."\n";
flock($fh, 8);
close($fh);
}
exit;

and here is some output

seg 1 GLOB(0x9213c28)
seg 1 GLOB(0x8b4dc28)
seg 1 GLOB(0x87a8c28)
seg 1 GLOB(0x8b8ac28)
seg 1 GLOB(0x9e20c28)
seg 1 GLOB(0x80c5c28)
seg 1 GLOB(0x8682c28)
seg 1 GLOB(0x95ebc28)
seg 1 GLOB(0x978cc28)

and thanks for the encouragement by knocking me to "-4" www.arobcorp.com

In reply to Re^2: Apache piping to perl by WiseGuru
in thread Apache piping to perl by WiseGuru

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.