in reply to if -s clause on a FILEHANDLE
If you want to know how much was written prior to closing the file, use tell to tell you :)
print OUT "@ftapes"; if( tell( OUT ) ) { ... } [download]