Greetings wise ones...
    Please forgive my mess.... I have read in the file....I parsed it into
the necessary fields (Code below)


#!/usr/perl 
#  Open Input and Output files.
$IN_FILE=$ARGV[0];
$OUT_FILE=$ARGV[0];
$HOST=$ARGV[1];

$OUT_FILE =~s/\.txt/\.out/;

open (fp_INPUT,"< $IN_FILE") or die ("Cannot open $IN_FILE for input.");
open (fp_OUT,"> $OUT_FILE") or die ("Cannot Open $OUT_FILE for output");

while (<fp_INPUT>){
   if (/$HOST/i){
 
($DATE,$CLOCK,$Message_Word,$MESSAGE_ID,$ACTION,$DIRECTION,$TARGET)=split(/\
s+/,$_);
         @START=split(/[:\.]/,$CLOCK);
         if ($hash{$MESSAGE_ID}==undef){
            print "$MESSAGE_ID is undefined\n";
            $hash{$MESSAGE_ID} = [$DATE, $CLOCK, $ACTION, $HOST];
         } else {
            print "$MESSAGE_ID is defined\n";
            @FINISH=split(/[:\.]/,$hash{$MESSAGE_ID}.$CLOCK );
        print (" HOUR: $FINISH[0] MINUTE:$FINISH[1]  SECOND:$FINISH[2]
Millisecond:$FINISH[3] ");
         }
      
         print (" HOUR: $START[0] MINUTE:$START[1]  SECOND:$START[2]
Millisecond:$START[3] ");
         
         if ($ACTION=~/received/i){
            print "$MESSAGE_ID  Received \n";
         } else{
            print "SENT $MESSAGE_ID\n";
         }
   }
}

unfortunately the bold line does not work, I am getting no data back...

if $CLOCK= 13:24:55.245 then FINISH[0]=13
                                             FINISH[1]=24
                                             FINISH[2]=55
                                             FINISH[3]=245
 Correct?

So can I call on your combined wisdom to help?

thanks in advanced.

Jerry L. O'Neill



_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to