Paul Johnson wrote:
> 
> On Fri, Jan 03, 2003 at 03:33:30PM -0800, John W. Krahn wrote:
> > Paul Kraus wrote:
> > >
> > > Ok a couple questions on Ref from pg 251 programming Perl.
> > >
> > > push @$arrrayref,$filename);
> > > $$arrayref[0]="January";
> > > @$arrayref[4..6]=qw/May June July/;
> > >
> > > So this is actually creating an anonymous array that it then references
> > > correct?
> > > so the assignments January ect are being made to an anonymous array.
> >
> > No, an anonymous array is delimited by [ and ].  That is creating an
> > actual array that is only accessible through an array reference.
> >
> > my $ref = [ 1, 2, 3, 4, 5 ];
> >           ^^^^^^^^^^^^^^^^^
> >            anonymous array
> 
> Not worth picking a fight over, to be sure, but I don't see the
> difference.  Assuming $arrayref didn't exist before, then after each of
> those three examples it will, and it will be a reference to an array
> with no name.  Seems to me that Paul got it spot on.

You are saying that it has no name but it does: arrayref.  If it truly
had "no name" then there would be no way to access it anywhere else in
the program.



John
-- 
use Perl;
program
fulfillment

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

Reply via email to