#!/usr/bin/perl -w open (F,'){ if (/^/) {$i++;$mod = $i%4; if ($mod > 1) {s/Image\(/Image0\(/s;s/Pic\(/Pic0\(/;} } print; }