#Closured.pm #!/usr/local/bin/perl -cw use strict; use warnings; package Closured; sub new{ our $self; my $closure = sub { shift; if(@_){ $self = shift; } return $self; }; bless $closure; return $closure; #returning a codeRef instead } sub name{ &{$_[0]}; } 1;