in reply to STDIN typeglob

open's documentation has a whole section on duplication filehandles, which shows different perlish way of duplicating (and temporarily overriding) the standard filehandles like STDIN. But using typeglobs for such a thing doesn't seem inherently un-perlish to me (not that I'm an expert) -- though I cannot explain it to you in technical terms.

You can seek on the DATA filehandle, though since it's actually partway through the active file, you'll want to use tell on DATA before doing any input from DATA so you'll know where to seek to in order to find the beginning of the _DATA_ section. There is some more on _DATA_ in Special Literals