uniq char that need to replaced without to put the "\"
I need to know if there is some way to replace any string as @ or * or ? or & without to put th开发者_开发技巧e "\" before it
Example
perl -pe 'next if /^#/; s/\@d\&/new_value/ if /param5/' test
in this example need to replace the @d& with new_value
but I need to put the "\" before @ or & can be other way without to put the "\" because I have random char that can be in the old value.perl -pe 'next if /^#/; my $regex=q/@d&/; s/$regex/new_value/ if /param5/' test
精彩评论