Harold Castro <mailto:[EMAIL PROTECTED]> wrote:

: I'm trying to loop into printing a series of lines so
: I used here document. Substitution of variables, e.g.,
: $_ works inside the HERE-Document but appending a
: string won't work
: 
: For example:
: 
: if the current content of $word is the word "big", and
: I would want to print a here document appending
: something to "big" like "foot":
: 
: print <<EOF;
: 
: $word."foot"     -> won't work, display it as is.
: "$word"."foot"   -> neither this one
: $wordfoot        -> error. it becomes a single
:  variable named $wordfoot
: 
: EOF

my $word = 'big';

print <<EOF;

${word}foot     -> Works Fine.

EOF


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to