Suresh Govindachar wrote:
> But what does "use a simple vrbl" mean? You mean a verbal
> description?
vrbl => variable
> Thanks for @{[]} -- it is better than evaluating outside the
> here doc. This is because the expressions I need to evaluate
> are fairly complex and the variables involved come from hashes.
> Moreover, I would like to do assignments inside the here doc
> that do not show up in $stuff at all, for example:
>
> |my $foo = 3;
> |my %boo=();
> |
> |my $stuff = <<EOD;
> | @{[eval{$boo{hoo1}=5; "remove_me";}]}
> | Twice $foo is @{[2 * $foo]}
> | Second line
> | @{[eval{$boo{hoo2}=2; "remove_me";}]}
> | Third line says that \$boo{hoo1} is $boo{hoo1}.
> |EOD
> |
> |$stuff =~ s/\s*remove_me\s*$//gm;
>
> What is the name for the @{[]} thingie -- how can it be found
> in perldoc? And is there a way to avoid the remove_me part?
perlfunc scalar
perlref near end of "Using References" just before "Symbolic references"
"remove_me" => '' would be the simple way. You're getting the eval
result back and have to drop it.
PS: Don't CC me - just respond to list (I get 3 copies when you do).
I CC you because you're the poster and want to make sure you get a
response when AS is slow/down.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs