in reply to seeking piped STDIO

To answer your question- No, you may not seek() on that pipe. Another solution would be to store the first line and pass it along with the file handle in the function call. You might also modify your script with "advanced features" such as taking file arguments which you could then easily read with <> or @ARGV. It might be worthwhile, since it won't take long and will enable you to seek() whenever you wish in the file for additional functionality.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.