bash-2.05$ perl -ple "@f=split; for (@f[1..4]) { $_=1000 if $_>1000; } $_=join(' ',@f)" TEST Can't modify constant item in scalar assignment at -e line 1, near "1000 if" Execution of -e aborted due to compilation errors. bash-2.05$ perl -lape "for(@F[1..4]){ $_=1000 if $_>1000 } $_=qq{@F}" TEST Can't modify constant item in scalar assignment at -e line 1, near "1000 if" Execution of -e aborted due to compilation errors.