Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Arrays/Perl/arrays-1.pl
Normal file
8
Task/Arrays/Perl/arrays-1.pl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
my @empty;
|
||||
my @empty_too = ();
|
||||
|
||||
my @populated = ('This', 'That', 'And', 'The', 'Other');
|
||||
print $populated[2]; # And
|
||||
|
||||
my $aref = ['This', 'That', 'And', 'The', 'Other'];
|
||||
print $aref->[2]; # And
|
||||
8
Task/Arrays/Perl/arrays-2.pl
Normal file
8
Task/Arrays/Perl/arrays-2.pl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
my @arr;
|
||||
|
||||
push @arr, 1;
|
||||
push @arr, 3;
|
||||
|
||||
$arr[0] = 2;
|
||||
|
||||
print $arr[0];
|
||||
5
Task/Arrays/Perl/arrays-3.pl
Normal file
5
Task/Arrays/Perl/arrays-3.pl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
my @multi_dimensional = (
|
||||
[0, 1, 2, 3],
|
||||
[qw(a b c d e f g)],
|
||||
[qw(! $ % & *)],
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue