"Tassilo Von Parseval" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> On Sun, Jun 01, 2003 at 11:22:32AM +0200 Kevin Pfeiffer wrote:
>
<snip />
>
>     open DATA, ">@{[ CFG ]}" or die ...;
>
> The part between @{[ ]} is arbitry Perl-code that is executed in list
> context and the last expression evaluated in this Perl code is what gets
> eventually printed.
>

If you want to interpolate a scalar value in a string you should probably
avoid creating an array reference, if only to avoid confusion:

[EMAIL PROTECTED] trwww]$ perl
use constant A_CONSTANT => '/some/path';
print("the constant's value is: ${ \A_CONSTANT }\n");
Ctrl-D
the constant's value is: /some/path

Todd W.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to