Example of handling functions as strings...
authorHarvie <tomas@mudrunka.cz>
Fri, 11 Jun 2010 13:52:41 +0000 (15:52 +0200)
committerHarvie <tomas@mudrunka.cz>
Fri, 11 Jun 2010 13:52:41 +0000 (15:52 +0200)
perl/map-reduce/function-string.pl [new file with mode: 0755]

diff --git a/perl/map-reduce/function-string.pl b/perl/map-reduce/function-string.pl
new file mode 100755 (executable)
index 0000000..d3a7d22
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+my $sub = q {{
+       print "rofl\n";
+}};
+
+print "$sub\n";
+eval $sub;
+eval "sub foo $sub"; foo();
This page took 0.088234 seconds and 4 git commands to generate.