in reply to Re: String Search/Replace
in thread String Search/Replace

Hm... I tried the first in your original post and your updated, both give the same error. I check, and the file I'm using is definatly writable.
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 "10 +00 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 "10 +00 if" Execution of -e aborted due to compilation errors.
Did I do something wrong?

-Jack C
jack {@} crepinc.com
http://www.crepinc.com/

Replies are listed 'Best First'.
Re^3: String Search/Replace
by ikegami (Patriarch) on Aug 31, 2005 at 14:41 UTC
    I'm using quoting appropriate for the Windows shell. Substitute " for ' and vice-versa for unix shells.
      Ahh ok thanks!

      -Jack C
      jack {@} crepinc.com