[Melbourne-pm] Simple(?) question involving backticks and die
Benji Wakely
benji at arsimagica.net
Wed Jan 4 21:33:03 PST 2006
On Thu, 5 Jan 2006 16:27:29 +1100 (EST),
Tim Connors <tconnors+pmmelb at astro.swin.edu.au> wrote:
>> my @list = `/bin/ls /home` || die ("Couldn't list files");
>
>Aren't you meant to use "or" rather than "||" when using die, for
>precedence reasons? Could this be what is happening? `` becomes scalar
>context when combined with the || ?
That checks out, and now I'll happily use 'or' rather than '||'
in this situation.
...Wish I knew why it was so, though.
--
Benji Wakely
More information about the Melbourne-pm
mailing list