} use Symbol; my $APP = gensym(); # Create the lexical handle the old style way, # for open can autovivify globs but tie can't. tie *$APP, Tie::Handle::CloseAppend::, "END"; open $APP, ">-" or die "error opening"; print $APP "Lorem ipsum dolor sit amet "; # note: perl will close handle when $APP goes out of scope __END__