=cut $tty = qx{aml_read /l trace /h ftwaeipd0001 /a commproc /s "12/04/2000 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/2000 07:00:00" /b "12/04/2000 08:00:00" /d all | egrep -c -e tty2}; printf("