On Monday, April 8, 2002, at 11:56 , Kevin Old wrote:
> Hello all,
>
> 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?
in it's self this is a 'neutral' - probably a hold over
from doing things cautiously in /bin/sh and simply hauled
into doing that defensive coding in perl.
As you may have noted from earlier scoping questions think of the case
my $var = "me";
my $var2 = "${var}2";
at which point $var2 has the string 'me2'
without the curlies and quotes it would have the
bare word problem or worse... be simply self referential:
my $var2 = $var2 ;
Some coders are MORE PARANOID than others....
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]