drock has asked for the wisdom of the Perl Monks concerning the following question:
## Set pragmas use strict; 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"; open (OUT, ">$foreigntapes") || die "could not open file:$!"; my @ftapes = grep s/^barcode=//, `evmvol -w label_state=1`; my $svsel = select; select OUT; $| = 1; print OUT "@ftapes"; if ( -s OUT ) { print "file is greater than 0 bytes \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: if -s clause on a FILEHANDLE
by Fletch (Bishop) on Jun 08, 2004 at 14:06 UTC | |
by drock (Beadle) on Jun 08, 2004 at 14:24 UTC | |
by Fletch (Bishop) on Jun 08, 2004 at 14:42 UTC | |
by drock (Beadle) on Jun 08, 2004 at 21:43 UTC | |
|
Re: if -s clause on a FILEHANDLE
by pelagic (Priest) on Jun 08, 2004 at 13:57 UTC | |
by Fletch (Bishop) on Jun 08, 2004 at 14:47 UTC | |
|
Re: if -s clause on a FILEHANDLE
by BrowserUk (Patriarch) on Jun 08, 2004 at 14:45 UTC |