in reply to Re^3: Reading terminal input while program is running
in thread Reading terminal input while program is running
So i guess somewhere whilst it is processing the file i would want to be able to lookout for user intput on the terminal$file=File::Tail->new(name=>$name, maxinterval=>1, adjustafter=> +1); while (defined($line=$file->read)) { my($logindate,$loginuser,$logoutdate,$logoutuser,$count); #if($line =~ /validateLogin\((.*)\)/){ $v = $1;} if($line =~ /INFO\s\s(\d+)(\d+)-(\d+)-(\d+)\s(\d+):(\d+):(\d+ +),(\d+)\s\[(.*)\]\s\((.*)\) - validateLogin\((.*)\)/){ $logindate = "$1$2-$3-$4 $5:$6:$7,$8"; $loginuser = "$11"; if(($logging)&&($debug)){&writelog(1,"DEBUG: Tail Event Logi +n found user date string = $logindate user = $loginuser");} } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Reading terminal input while program is running
by tirwhan (Abbot) on Feb 01, 2006 at 11:55 UTC | |
by minixman (Beadle) on Feb 02, 2006 at 09:15 UTC |