#!/usr/bin/perl -w
use strict;

my @arr = (0, 1, 2, 3, 4);
popchop(\@arr);
print "@arr\n";

sub popchop {
  my ($ref) = @_;
  pop @{$ref};
  shift @{$ref};
}
