use IO::All; use IO::File; open G, 'new_from_fd(fileno(*G{IO}), 'r'); $i = io($h); print $i->getline