#!/usr/bin/perl -w use strict; my @life = qw 'birth starting middle ending death'; foreach my $part (@life){ if($part ne 'death'){ print "Have fun, Code perl!\n"; } else{ die "There's nothing left to code...\n"; } }