in reply to Re: qw "$string $string" doesn't interpolate
in thread qw "$string $string" doesn't interpolate
Have you checked to see ifNo, but doing so shows me that @option_config is equivalent to:my @option_config = q" $UNIQUE_OPT $FORCE_OPT $VERBOSE_OPT $OUTPUT_EXT_OPT=s ";
a single element array, complete with the newlines and leading whitespace. Not DWIM.[ ' $UNIQUE_OPT $FORCE_OPT $VERBOSE_OPT $OUTPUT_EXT_OPT=s ' ]
I'm not sure what your point was...Should q"" interpolate or not? I would suggest it should not, because that would be confusing. But I could live with the argument that it should, because then the behavior of double-quotish strings would be consistent.
On the 3rd hand, things like s"$foo"$bar" behave differently from s'$foo'$bar':
My point is, qw is not apparently single-quotish in nature, but it would DWIM to have it double-quotish using double quotes, as with other operators.$foo = 'foo'; $bar = 'bar'; $football = 'football'; ($x = $football) =~ s"$foo"$bar"; # $x eq 'bartball' ($x = $football) =~ s'$foo'$bar'; # $x eq 'football' (no change)
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: qw "$string $string" doesn't interpolate
by PodMaster (Abbot) on Jun 12, 2004 at 22:26 UTC |