in reply to [SOLVED] Interleave STDIN and FILE IO

If you want to retrieve stuff out of @batch in LIFO sequence, use shift instead of pop.

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992