naez has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use Net::IRC; use File::Tail; $name="./totte.log" ; $file=File::Tail->new(name=>$name,debug=>$debug,interval=>1,maxinterv +al=>5, adjustafter=>20,errmode=>"return") or die "Could not open $name: $!"; sub on_logentry { my $INPUT = shift; my $line=$file->read; printf "$line"; printf <$INPUT>; } # Setup the connection variables--- my $irc = new Net::IRC; # Add the external stuff $irc->addfh( $file, \&on_logentry, 'r'); # -------------- Start the IRC Connection ---------------- $irc->start;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::IRC and File::Tail
by cdarke (Prior) on Aug 16, 2007 at 08:09 UTC | |
by naez (Initiate) on Aug 16, 2007 at 08:59 UTC | |
|
Re: Net::IRC and File::Tail
by moritz (Cardinal) on Aug 16, 2007 at 09:08 UTC | |
by naez (Initiate) on Aug 16, 2007 at 09:45 UTC | |
by Corion (Patriarch) on Aug 16, 2007 at 09:52 UTC | |
by naez (Initiate) on Aug 16, 2007 at 10:07 UTC | |
by Corion (Patriarch) on Aug 16, 2007 at 10:26 UTC | |
| |
by jasonk (Parson) on Aug 16, 2007 at 11:58 UTC | |
by Corion (Patriarch) on Aug 16, 2007 at 12:02 UTC |