#! perl -slw use strict; use threads; use threads::shared; use File::Tail; my $quit :shared = 0; $SIG{ INT } = sub{ $quit = 1; warn 'Quiting'; }; sub thread { my $tid = threads->self->tid; my $name = shift; my $file = File::Tail->new( $name ); while( not $quit and defined( my $line = $file->read ) ) { print "$tid ($name) '$line'"; } } $_->join for map{ threads->create( \&thread, $_ ) } glob $ARGV[ 0 ];