use strict; use warnings; while () { s/a/x/g unless $. & 1; print; } __DATA__ Anyone know a way to apply a substitution in a file to every other line rather than the hole file? #### Anyone know a way to apply a substitution in x file to every other line rather thxn the hole file?