#!/usr/bin/perl -w use Net::IRC; use File::Tail; $name="./totte.log" ; $file=File::Tail->new(name=>$name,debug=>$debug,interval=>1,maxinterval=>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;