Skip to content

Instantly share code, notes, and snippets.

@tokuhirom
Created December 18, 2008 05:56
Show Gist options
  • Save tokuhirom/37401 to your computer and use it in GitHub Desktop.
Save tokuhirom/37401 to your computer and use it in GitHub Desktop.
sub strip_nl (&) {
my $code = shift;
global_context->mt->filter(sub {
s/^\s+//smg;
s/[\r\n]//g;
})->($code);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment