Thanks for your help Swiftone.

Ok, here's what I've done. I copied the aml_read line with hardcoded variables inside the loop and it didn't work. Then I put the same line before the loop and it seemed to work. Here is what the code looks like right now including what's commented out with the =cut:

=cut $tty = qx{aml_read /l trace /h ftwaeipd0001 /a commproc /s "12/04/2 +000 07:00:00" /b "12/04/2000 08:00:00" /d all | egrep -c -e tty2}; =cut for ($i = $TTYFIRST; $i <= $TTYLAST; $i++) { Tty_check($i,$start_ts,$end_ts,$selectedserver); } sub Tty_check { $tty_string = sprintf( "tty%d", $_[0] ); =cut $tty = qx{aml_read /l trace /h $_[3] /a commproc /s $_[1] /b $_[2] + /d all | egrep -c -e $tty_string}; =cut $tty = qx{aml_read /l trace /h ftwaeipd0001 /a commproc /s "12/04/2 +000 07:00:00" /b "12/04/2000 08:00:00" /d all | egrep -c -e tty2}; printf("<TR ALIGN=LEFT VALIGN=TOP>\n"); printf("<TD>%s</TD>\n",$tty_string); chomp($tty); printf("<TD>%d</TD>\n",$tty); printf("</TR>\n"); }

So it does appear that there is a problem with the loop, although yesterday I displayed the contents with the qq instead of qx inside the loop and got what I was expecting. What next?


In reply to Re: Re: for SWIFTONE by Motley
in thread for SWIFTONE by Motley

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.