Printing string in Perl

后端 未结 6 1603
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-15 04:39

Is there an easy way, using a subroutine maybe, to print a string in Perl without escaping every special character?

This is what I want to do:

print          


        
6条回答
  •  生来不讨喜
    2021-01-15 05:10

    $str = q(this is a "string");
    print $str;
    

    if you mean quotes and apostrophes with 'special characters'

提交回复
热议问题