#!/usr/bin/perl
use strict;
use warnings;
my @array = [1,2,3,['a','b',['c']]];
my $rA = \@array;
print"\n[0] = [1,2,3,['a','b',['c']]]";
print"\n[3] = ['a','b',['c']]";
print"\n[2] = ['c']";
print"\n[0] = c";
print "\nResp : $rA->[0][3][2][0]\n";
my @des = [ ['andre','21','PA'],
['ela','-','SP']];
my $rD = \@des;
print $rD->[0][0][0];
result
$ perl line.pl
[0] = [1,2,3,['a','b',['c']]]
[3] = ['a','b',['c']]
[2] = ['c']
[0] = c
Resp : c
andre
0 comentários:
Post a Comment