develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000317.003] missing slice of reference

Thread Next
From:
Mark Overmeer
Date:
March 17, 2000 02:53
Subject:
[ID 20000317.003] missing slice of reference
Message ID:
20000317115316.G20003@atcmpg.ATComputing.nl
If for the following lack in the implementation, and couldn't
find any reference to this problem in the archives:

   my @x = qw(one two three four five);
   my $y = \@x;

   print '$x[1]   : ', $x[1],"\n";
   print '${$y}[1]: ', ${$y}[1],"\n";
   print '$$y[1]  : ', $$y[1],"\n";
   print '$y->[1] : ', $y->[1],"\n";

   print '@x[1,2]   : ', @x[1,2],"\n";
   print '@{$y}[1,2]: ', @{$y}[1,2],"\n";
   print '@$y[1,2]  : ', @$y[1,2],"\n";
   print '@y->[1,2] : ', @y->[1,2],"\n";   #doesn't work.

The same for reference to hashes.
The latter should work for completeness sake (and I want to use it, too)

The error of
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:    [and]
Summary of my perl5 (5.0 patchlevel 5 subversion 57) configuration:
      osname=solaris, osvers=2.5.1, archname=sun4-solaris

is "Use of uninitialized value"
-- 
Sincerely,

               MarkOv       %-]

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                           markov@ATComputing.nl
AT Computing, UNIX Training and Consultancy    http://www.ATComputing.nl
http://www.dhp.nl/~markov/                         http://satfoto.dhp.nl

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About