in reply to question for open2, and by the way, resolves an old thread
A bit nasty, but using
print $writer "history; exit\n"; [download]
Hope this helps, -gjb-