Error string reads: Uncaught exception from user code: error: can not lock open: ( sf.F02002capacity: 189.1G 4 Carp::croak('error: can not lock open:(sf.F02002 Logfile::Rotate::new('Logfile::Rotate', 'File', ' sf.F02002 4 main::logroll('/usr/local/log/fuji_tapeszs.log') called at tapesz_chk.O0 ####################################### ## Set pragmas and modules (LC/UC) ## ####################################### require 5.6.1; use strict; use warnings; use diagnostics; use MIME::Lite (); use Logfile::Rotate (); $ENV{"PATH"} = qq(/opt/SUNWsamfs/sbin:/usr/bin:/usr/sbin:/usr/local/log); my $wd=40; my $tpexports = qq(/usr/local/log/exports); my $hrtlabtapeszs = qq(/usr/local/log/heartlab_tapeszs.log); my $fujitapeszs = qq(/usr/local/log/fuji_tapeszs.log); my $slhtapeszs = qq(/usr/local/log/slh_tapeszs.log); open (FFFF_, "+>$tpexports") || die "could not open file: $tpexports $!"; open (FFF_, "+<$hrtlabtapeszs") || die "could not open file: $hrtlabtapeszs $!"; open (FF_, "+<$fujitapeszs") || die "could not open file: $fujitapeszs $!"; #open (F_, "+<$slhtapeszs") || die "could not open file: $slhtapeszs $!"; system("archiver -lv|egrep 'sf.H02[0-9][0-9][0-9]' > $hrtlabtapeszs"); system("archiver -lv|egrep 'sf.F02[0-9][0-9][0-9]' > $fujitapeszs"); #system("archiver -lv|egrep 'sf.L02[0-9][0-9][0-9]' > $slhtapeszs"); select( (select(FFFF_), $|=1 ) [0] ); select( (select(FFF_), $|=1 ) [0] ); select( (select(FF_), $|=1 ) [0] ); #select( (select(F_), $|=1 ) [0] ); while () { if (substr($_, 52, 5) == 0 ){ chomp $_; my $hvalustr=substr($_, 52, 5); my $htpstr=substr($_, 2, 9); #system("samexport $htpstr"); #&logroll(); print FFFF_ "$htpstr\t$hvalustr\n"; } } while () { if (substr($_, 52, 5) == 0 ){ chomp $_; my $fvalustr=substr($_, 52, 5); my $ftpstr=substr($_, 2, 9); #system("samexport $ftpstr"); &logroll($fujitapeszs); print FFFF_ "$ftpstr\t$fvalustr\n"; } } #while () { # if (substr($_, 52, 5) == 0 ){ # chomp $_; # my $svalustr=substr($_, 52, 5); # my $stpstr=substr($_, 2, 9); # system ("samexport $stpstr"); # &logroll($slhtapeszs); # print FFFF_ "$stpstr\t$svalustr\n"; # } #} if ( -s $tpexports ) { print FFFF_ "\n",'-' x $wd, "\n"; print FFFF_ "TapeID\t BytesRemaining\n\n"; print FFFF_ "Please eject these as offsite permanent!\nOhioHealt h Unix Support"; #&mailme; #&logroll; } sub mailme { my $msg = MIME::Lite->new( From => 'stkv440 ', #To => 'OHIS Operations ', To => 'Derek Smith ', Subject => "ASM Copy 2 exports", Type => 'multipart/related'); $msg->attach( Type => 'TEXT', Path => "$tpexports", Filename => "$tpexports"); #$msg->send; } #foreach ($fujitapeszs,$hrtlabtapeszs,$tpexports,$slhtapeszs) { #if ( -s $_ or -s $_ or -s $_ or -s $_ ) { #foreach ($_) { sub logroll { my $logs = new Logfile::Rotate (File => $_, Count => 10, Gzip => 'lib', Dir => '/usr/local/log/old', Flock => 'yes', Persist => 'yes' ); $logs->rotate(); } #} #} #} #close (F_) or warn "unable to close file $!"; close (FF_) or warn "unable to close file $!"; close (FFF_) or warn "unable to close file $!"; close (FFFF_) or warn "unable to close file $!";