[ create a new paste ] login | about

Link: http://codepad.org/HGDUmiC9    [ raw code | output | fork ]

sironekotoro - Perl, pasted on Sep 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;

my @array = ('Alice' , 'Bob');
unshift @array , 'Amon2';
push @array , 'Catalyst';

print "@array\n" ;

my @array_2 = ('Alice' , 'Bob');
my $element_2 = shift @array_2;
print "$element_2\n";

my @array_3 = ('Alice' , 'Bob');
my $element_3 = pop @array_3;
print "$element_3\n";


Output:
1
2
3
Amon2 Alice Bob Catalyst
Alice
Bob


Create a new paste based on this one


Comments: