1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 01:18:00 +00:00

Replace all uses of Perl <> with <<>>.

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 in any of these contexts!

Fortunately, in this project it only comes up in non-critical
'contrib' scripts.
This commit is contained in:
Simon Tatham 2019-01-25 20:12:39 +00:00
parent 0e9ad99c04
commit 98cb60ef8e
2 changed files with 3 additions and 3 deletions

View File

@ -1032,7 +1032,7 @@ my ($direction, $seq, $ourseq, $type, $data, $recording);
my %ourseqs = ('i'=>0, 'o'=>0);
$recording = 0;
while (<>) {
while (<<>>) {
if ($recording) {
if (/^ [0-9a-fA-F]{8} ((?:[0-9a-fA-F]{2} )*[0-9a-fA-F]{2})/) {
push @$data, map { $_ eq "XX" ? -1 : hex $_ } split / /, $1;

View File

@ -19,7 +19,7 @@
use strict;
use warnings;
while (<>) {
while (<<>>) {
if (/^ ([0-9a-f]{8}) ((?:[0-9a-f]{2} ){0,15}(?:[0-9a-f]{2}))/) {
my $addr = $1;
my $hex = $2;
@ -36,7 +36,7 @@ while (<>) {
if ($old_line ne $new_line and
$old_line eq substr($new_line, 0, length($old_line))) {
print "$new_line\n";
<>; # eat the subsequent wrapped line
<<>>; # eat the subsequent wrapped line
next;
}
}