#!/usr/bin/perl use strict; use warnings; sub hello_world { my $from = shift; return "Hello World from " . $from; } sub decorate_h1 { my $sub = shift; return sub { my @args = @_; return "

" . $sub->(@args) . "

" }; } my $hello_headline = decorate_h1(\&hello_world); print $hello_headline->("Perl"), "\n";