Syntactic Confectionery Delight | |
PerlMonks |
Re^2: peek at STDIN, to determine data type and then pass STDIN to a parserby aral (Acolyte) |
on Jan 08, 2015 at 09:43 UTC ( [id://1112631]=note: print w/replies, xml ) | Need Help?? |
Excellent solution as well - I just tested it and it worked out of the box like this:
Output for "cat xmlfile | ./perscript.pl" is:
Thank you very much! FileHandle::Unget is *the* answer to my original question. @ikegami: Unfortunately, the install script (Makefile) for IO::Unread fails with error messages, and there seems to be no debian packet for it available in jessie - so I was not able to test this.
In Section
Seekers of Perl Wisdom
|
|