was hoping for some add'l assistance.  I deleted the bulk of the code out 
b/c I cannot get it to send me the results of the if clause.  Any ideas?
I did verify the file is being appended to and is greater that 0 bytes.
The if -s on the array is running b/c my else clause is creating the run 
file with a current timestamp???

-rw-r--r--   1 root     eb          7577 Jun  7 17:53 foreign_tapes.log
-rw-r--r--   1 root     other          0 Jun  7 17:53 ftapes_runfile


        use strict;
        use warnings;
 

## Set and edit variables

        my $foreigntapes="/usr/local/log/foreign_tapes.log";
        delete $ENV{'IFS'};
        local $ENV{'PATH'} = 
"/usr/epoch/bin:/usr/epoch/EB/bin:/usr/bin:/usr/sbin:/bin:/sbin";
        #print $ENV{'PATH'},"\n";

## Traverse through array and play with data

        open (OUT, ">$foreigntapes") || die "could not open file:$!";
        my @ftapes = grep s/^barcode=//, `evmvol -w label_state=1`;
        print OUT "@ftapes";
        if ( -s @ftapes ) {
                     print "file is greater than 0 bytes \n";
                     `ls -la /usr/local/log/foreign_tapes.log`;
                     foreach (@ftapes) {
                           print $_;
                           #`evmlabel -l st_9840_acs_0 -t 9840S -b$_` 
                     }
        close (OUT);
        } else {
                my $foo="/tmp/ftapes_runfile";
                open (RUNFILE, ">$foo") || die "could not open runfile: 
$!;"
        }
        close (RUNFILE);

thank you,
 
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams

Reply via email to