Я только начинаю изучать Perl. Я посмотрел на начальную страницу Perl и начал работать.
В нем говорится:
Разница между одинарными и двойными кавычками заключается в том, что одинарные кавычки означают, что их содержимое следует понимать буквально, а двойные кавычки означают, что их содержимое следует интерпретировать.
Когда я запускаю эту программу:
#!/usr/local/bin/perl
print "This string \n shows up on two lines.";
print 'This string \n shows up on only one.';
Он выводит:
This string shows up on two lines. This string shows up on only one.
Я где-то ошибся? версия Perl ниже:
perl -v
This is perl, v5.8.5 built for aix
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.