#!/usr/bin/perl use strict; &doIt("foo", "bar", "foobar"); sub doIt() { print pop, "\n"; #prints "foobar" print pop, "\n"; #prints "bar" print pop, "\n"; #prints "foo" }