in reply to qw "$string $string" doesn't interpolate
qw is expanded before the code runs. At that time, variables usually have no value yet. Interpolation would mean delaying until runtime, of having very unexpected results. Of course, it could still optimize for the variableless case, but that would mean that qw($foo $bar) is many times slower than qw(foo bar).juerd@ouranos:~$ perl -MO=Deparse -e'print qw(a b c)' print 'a', 'b', 'c'; -e syntax OK
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: qw "$string $string" doesn't interpolate
by QM (Parson) on Jun 14, 2004 at 19:46 UTC | |
by Juerd (Abbot) on Jun 14, 2004 at 20:29 UTC |