[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] @$a[0] = 5;



I found a similar code and I am quite sure the
programmer simply wanted to use "$a[0]", however,
it works and produces no warnings.

Can someone enlighten me, please?

 
use strict;
use diagnostics;

#my $a;
#my $b;

@$a[0] = 5;
@$b[0] = 6;

print @$a[0]; # prints "5"


Roland
--
roland.bauer@fff.at
http://www.fff.at/fff/roland/


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe