esharris has asked for the wisdom of the Perl Monks concerning the following question:
produce this output in perl, v5.8.1?#!/usr/bin/perl -w use strict; my $x = 'Dwayne Johnson'; print <<XXX; $x's the Rock. XXX
The problems go away if I prepend the single quote with a backslash.Name "x::s" used only once: possible typo at ./test.pl line 7. Use of uninitialized value in concatenation (.) or string at ./test.pl + line 7. the Rock.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: <<, variable, and single quote behaving badly.
by saintmike (Vicar) on Apr 26, 2004 at 17:38 UTC | |
|
Re: <<, variable, and single quote behaving badly.
by bart (Canon) on Apr 26, 2004 at 19:15 UTC | |
by Errto (Vicar) on Apr 27, 2004 at 01:20 UTC | |
|
Re: <<, variable, and single quote behaving badly.
by Plankton (Vicar) on Apr 26, 2004 at 17:34 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |