my @ejectapes = qw(/usr/local/bin/perld/lvimgGH_ms0_tapes.orig); #($^I, @ARGV) = ('.bak', @ejectapes); open (FILE, "< @ejectapes") or die "cannot open @ejectapes: $!"; while () { chomp; print "$_ " if 1 .. 40; } #s/(^E+)/eject\t0,0,0 \t$1/ close FILE; print "\n";