chiark / gitweb /
benchmark.pl: replace use of Perl <> with <<>>.
authorSimon Tatham <anakin@pobox.com>
Fri, 25 Jan 2019 20:27:49 +0000 (20:27 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 25 Jan 2019 20:27:49 +0000 (20:27 +0000)
I've only just found out that it has the effect of treating the argv
words not as plain filenames, but as arguments to Perl default 'open',
i.e. if they end in | then the text before that is treated as a
command. That's not what was intended!

benchmark.pl

index 98763859e8375967f30bad5f89cc208b079db2ba..7ac48abc25caa460b016fd35df5565f90b230899 100755 (executable)
@@ -9,7 +9,7 @@ my @presets = ();
 my %presets = ();
 my $maxval = 0;
 
-while (<>) {
+while (<<>>) {
     chomp;
     if (/^(.*)(#.*): ([\d\.]+)$/) {
         push @presets, $1 unless defined $presets{$1};