"G. E." wrote:
> 
> As I' ve read in "Programming Perl", double-quoted strings are subject to
> variable interpolation of scalars and list values. Nothing else
> interpolates.
> So the following perl code won't compile:
> 
>         $st = "!--- &get_header("Users")---!";
> 
>         sub get_header{
>                 $hnd->fixHead(@_);
>         }
> 
> also the following line of code won't compile (which does the same as the
> above):
>         $st = "!--- $hnd->fixHead("Users")---!";
> 
> If I use the '.' operator (concatenation) my work is done. For example:
> $st = "!--- " . $hnd->fixHead("Users") . "---!";
> 
> My question is if there is any way, that will let me do such an
> interpolation, without concatenation. For example I've started reading
> about overloading the stringify, but I realized that it isn't what I'm
> looking for.
> Is there a way to have the return value of $hnd->fixHead("Users")
> interpolated into my string, without concatenation?


perldoc -q 'How do I expand function calls in a string'


John
-- 
use Perl;
program
fulfillment

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

Reply via email to