Kevin Old wrote:
>
> Hello all,
Hello,
> Quick question about variables. I am editing a few scripts written by
> another programmer and he programs every variable surrounded in brackets,
> like ${var_name}.
>
> Is there any advantage to this?
If you are interpolating a variable in a text string, to separate the
variable from the text.
$ perl -le' $t = "T"; print "This is a $text s${t}ring."'
This is a sTring.
The first occurance of $t is interpolated as $text which isn't defined.
> The only reason I can think that he is doing this is because of the module
> that is used. Maybe to localize the variable or something like that.
>
> But, I thought that all variables not specified by a module
> ($Mod_name::var_name) were localized to that script.
It has nothing to do with scope.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]