GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b104831
)
Example of handling functions as strings...
author
Harvie
<tomas@mudrunka.cz>
Fri, 11 Jun 2010 13:52:41 +0000
(15:52 +0200)
committer
Harvie
<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]
patch
|
blob
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
+++ b/
perl/map-reduce/function-string.pl
@@ -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.100133 seconds
and
4
git commands to generate.