in reply to __DATA__ only one time

Just save the position of the __DATA__ section first time around e.g
use vars '$DATA_POS'; $DATA_POS = tell *DATA unless defined $DATA_POS; # update - swapped args to be in correct order seek *DATA, $DATA_POS, 0; while(<DATA>) { ... }
Now that will always seek to the beginning of the __DATA__ section.
HTH

_________
broquaint