in reply to @ printing content of referenced array
Did you take a wrong turn somewhere? This isn't a php forum, it's a perl forum.
use strict; use warnings; use 5.010; my @numbers = (10, 20, 30); say "The numbers are: @numbers"; #The numbers are: 10 20 30 my $aref = \@numbers; say "The numbers are: @$aref"; #The numbers are: 10 20 30 say "One number is: @$aref[0]"; #10 say "Another number is: " . $aref->[2]; #30
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |