What's the difference between single and double quotes in Perl?

后端 未结 6 1285
小蘑菇
小蘑菇 2020-11-30 13:50

In Perl, what is the difference between \' and \" ?

For example, I have 2 variables like below:

$var1 = \'\\(\';
$var2 = \"         


        
6条回答
  •  隐瞒了意图╮
    2020-11-30 14:27

    "" Supports variable interpolation and escaping. so inside "\(" \ escapes (

    Where as ' ' does not support either. So '\(' is literally \(

提交回复
热议问题