It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/perl -w
use strict;
my @array = (\"item\",'item3',4);
push(@array,\"item5\"); #Adds item5 to @array
my $var = pop(@array); # Removes the last item and puts it into $var
my $a = @array; # $a is the number of items in @array
my $b = \"@array\"; # $b is list of @array items separated by space
my ($x, $e) = @array; # Assignts the first two items of @array to $x and $e
my ($xe, @array2) = @array; # $xe is the first item from @array, @array2 is the rest
print @array.\"\n\";
print $var.\"\n\";
print $a.\"\n\";
print $b.\"\n\n\";
print $x.\" \".$e;
print $xe.\" <- \".@array2.\"\n\";
3
item5
3
item item3 4
item item3item <- 2