in reply to using qx{}
$username[0] = "bob"; @foo = qx { echo $username[0] };
qx interpolates the string so @foo[0] will get set to 'bob'.
To avoid this you could escape the string:
$username[0] = "bob"; @foo = qx { echo \$username[0] };
This would cause the $username not to be interpolated and it would let the shell decipher a variable called $username when it called the echo.
Hope that helps.
-monkfish (The Fishy Monk)
9/14/01 Edited to clarify and remove incorrect portion of post.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using qx{}
by CheeseLord (Deacon) on Sep 04, 2001 at 05:07 UTC | |
by Rhandom (Curate) on Sep 05, 2001 at 01:38 UTC |