On Wed, Aug 16, 2000 at 10:38:30AM -0600, John Barnette wrote:
> John Porter wrote:
> > Russ Allbery wrote:
> > >     $args = 'first second third';
> > >     @args = split (' ', $args);
> > >     my $i = 0;
> > >     %args = map { $_ => ++$i } @args;
> > >
> > > This is very Perlish to me; the punctuation is part of the variable name
> > > and disambiguates nicely.
> > 
> > No, it's not.  Where are we taught this?  It's a myth.
> > The punctuation imposes context on the variable expression.
> >         $foo[0]
> > accesses an array.  Where's the "@"?
> 
> It accesses an *element* of the array, which is a scalar.  This scalar
> might be blessed into a class, or a reference to an array or hash, but
> the element itself is still a scalar.  Where's the confusion?

I believe Mr. Porter is refuting the claim that "the punctuation is
part of the variable name".  As both he and you have demonstrated,
it's not.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to