Re: FAQ 4.36 How can I expand variables in text strings?
- From: brian d foy <brian.d.foy@xxxxxxxxx>
- Date: Wed, 06 Aug 2008 07:11:34 -0500
In article <gcnmm5x06a.ln2@xxxxxxxxxxxxxxx>, Eric Pozharski
<whynot@xxxxxxxxxxxxxx> wrote:
C<ping-pong whatever> means a contents where participants attempt to
find as many ways to achieve something using some tools.
Well, that seems to have nothing to do with ping pong, a game of
hitting a ball back and forth over and over again.
Take a look at that part of answer (yes, it's taken out of context, but
that's what reader sees first):
my $foo = 'Fred';
my $bar = 'Barney';
$string = 'Say hello to $foo and $bar';
The question states C<How can I expand variables in text strings?>. The
unexpert reader (me?) doesn't get why C<q()> is used in place of
C<qq()>. The latter perfectly expands I<$foo> and I<$bar>.
If we used double quotes, it would interpolate the varaibles and we
wouldn't have a text string with placeholders that we need to expand,
and we wouldn't need the answer.
May be I've missed something again, but I failed to find in neither
question nor answer any notion that I<$foo> and I<$bar> are undefined at
compile time. BTW, the answer misses either discussion or redirection
why C<$string = eval { "Say hello to $foo and $bar"; };> is bad.
This isn't a relevant question for this topic. We're not talking about
interpolation of double quoted strings. We're talking about literal
strings---those don't do interpolation.
And the block eval does nothing for you, btw.
.
- Follow-Ups:
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: Eric Pozharski
- Re: FAQ 4.36 How can I expand variables in text strings?
- References:
- FAQ 4.36 How can I expand variables in text strings?
- From: PerlFAQ Server
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: npc
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: Eric Pozharski
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: brian d foy
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: Eric Pozharski
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: brian d foy
- Re: FAQ 4.36 How can I expand variables in text strings?
- From: Eric Pozharski
- FAQ 4.36 How can I expand variables in text strings?
- Prev by Date: Re: CLPM - a help group?
- Next by Date: Re: FAQ 4.61 How can I always keep my hash sorted?
- Previous by thread: Re: FAQ 4.36 How can I expand variables in text strings?
- Next by thread: Re: FAQ 4.36 How can I expand variables in text strings?
- Index(es):
Relevant Pages
|