Try eval (I've added needed additional parens around second matching group):
perl -pi -e 'substr($_,589,35) =~ s/(0*)((\w+)*)/$2.(' ' x length($1))/e if /^(.{589})(0{1,34})/' file.txtIn reply to Re: Oneliner with substring trimming and padding
by grizzley
in thread Oneliner with substring trimming and padding
by Neighbour
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |