Skip to content

Instantly share code, notes, and snippets.

@run4flat
Last active December 11, 2015 10:28
Show Gist options
  • Select an option

  • Save run4flat/4587135 to your computer and use it in GitHub Desktop.

Select an option

Save run4flat/4587135 to your computer and use it in GitHub Desktop.
sub build_state_func {
my $state_var
return sub {
# work with state here
}
}
...
*globref = build_state_func();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment