perl +在Perl中忽略“/”字符

我想用America / JamaicareplacestringAmerica / Adak:

perl -i -pe "s/$A/$B/" /etc/sysconfig/clock 

请指出需要在perl语法中更新什么? (问题是我有“/”所以需要忽略这个uniq字符,需要添加到我的Perl语法?

  A="America/Adak" B="America/Jamaica" CLOCK=/etc/sysconfig/clock perl -i -pe "s/$A/$B/" $CLOCK Bareword found where operator expected at -e line 1, near "s/America/Adak/America" syntax error at -e line 1, near "s/America/Adak/America" Execution of -e aborted due to compilation errors. more $CLOCK # The ZONE parameter is only evaluated by system-config-date. # The timezone of the system is defined by the contents of /etc/localtime. ZONE="America/Adak" UTC=true ARC=false 

使用不同的分隔符,例如:

 perl -i -pe "s|$A|$B|" $CLOCK 

请参阅perlre手册页。