summaryrefslogtreecommitdiffstats
path: root/tests/langbench/cat.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/langbench/cat.pl')
-rw-r--r--tests/langbench/cat.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/langbench/cat.pl b/tests/langbench/cat.pl
new file mode 100644
index 0000000..915af0a
--- /dev/null
+++ b/tests/langbench/cat.pl
@@ -0,0 +1,10 @@
+# One could argue this should be
+# while ($foo = <>) { chomp($foo); print $foo . "\n"; }
+# to match what tcl does.
+# That slows it down by a factor of 2.
+foreach $file (@ARGV) {
+ open(FD, $file);
+ while ($buf = <FD>) {
+ print $buf;
+ }
+}