my $lflag; open my $fh, ">>foo" or ErrorHandler( $?, $! ); $lflag = ( -l 'foo' ); unless( $lflag } { # process file } close $fh; # it was opened for append but append only occurred for non-link case