Reputation: 4190
I'm processing multiple files with find ... | xargs perl -ne
and when I proceed to next file I need to reset some variables like gawk 'BEGINFILE {}'
does.
As a workaround, I check that the current filename changed. Is there a cleaner way?
if ($oldARGV ne $ARGV) { $oldARGV = $ARGV; $var1=""; ... } ...
Upvotes: 3
Views: 197