#! /usr/bin/perl -w use strict; main->foobar($ARGV[0]); sub foobar { if ($_[1]) { print "foo$_[1]bar\n"; } else { print "foobar\n"; } }