Re: unexpected escaping

2016-01-29 Thread Jorge Almeida
On Fri, Jan 29, 2016 at 2:48 AM, Charles DeRykus wrote: > On Fri, Jan 29, 2016 at 12:39 AM, Jorge Almeida wrote: >> Can someone help me to understand this? >> >> #!/usr/bin/perl >> use strict; >> use warnings; >> my $s='\\n'; >> print $s; >> >> >> Output: >> \n >> >> Expected output: >> \\n >> >>

Re: unexpected escaping

2016-01-29 Thread Charles DeRykus
On Fri, Jan 29, 2016 at 12:39 AM, Jorge Almeida wrote: > Can someone help me to understand this? > > #!/usr/bin/perl > use strict; > use warnings; > my $s='\\n'; > print $s; > > > Output: > \n > > Expected output: > \\n > > > Jorge Almeida > From: perldoc perlop q/STRING/ 'STRING'

unexpected escaping

2016-01-29 Thread Jorge Almeida
Can someone help me to understand this? #!/usr/bin/perl use strict; use warnings; my $s='\\n'; print $s; Output: \n Expected output: \\n TIA Jorge Almeida -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org