Help for this page
open( my $testfile, "+>> $file" ) $!\n"; if ( -z "$testfile" ) ---> checking for empty file
open my $testfile,'+>>',$file or die "Can't open '$file': $!"; my $pos=tell $testfile; ($pos!=-1) or die "tell failed for '$file': $!"; ... } else { # file has some content }