#!/usr/bin/perl

@sandwich = qw(bread bologna bread);

print "@sandwich\n";

splice (   @sandwich,
           # remove the bologna
           1, 1,
           # replace with club innards
           qw(chicken lettuce bread bacon mayo)
       );

print "@sandwich\n";

# Hey, you forgot to butter that bread.  And hold the mayo.
splice ( @sandwich,  1, 0, "butter" );
splice ( @sandwich, -2, 1, "butter" );

print "@sandwich\n";

# Enjoy!
@mouth = splice ( @sandwich, 0 );

