# Long, understandable version $old_fh = select(OUTPUT_HANDLE); $^I = '.orig'; select($old_fh); # Short version $^I = '.orig', select $_ for select OUTPUT_HANDLE;