in reply to How to select a file handle depending on user options
$HANDLE = *FILE; ... $HANDLE = *STDIN; [download]
See Typeglobs and Filehandles.