#!/usr/bin/perl -w use strict; my $sref=\&foo; &{$sref}; exit(0); sub foo { print "This is foo.\n"; }