Skip to content

Commit

Permalink
colrm: accidental $_ (#462)
Browse files Browse the repository at this point in the history
* In 2-argument colrm, default variable $_ is not used in the loop
* Adding \n back to line is reversing the chomp at start of loop
* I checked that $_ did not have a value here
* test: "perl colrm 2 2 < file.txt" removes the 2nd character on each line of file.txt
  • Loading branch information
mknos committed Feb 14, 2024
1 parent 7d64550 commit 0a6e3b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/colrm
Expand Up @@ -54,7 +54,7 @@ if (@ARGV > 2) {
print substr $line, 0, $startcol - 1;
print substr $line, $endcol;
}
print "$_\n";
print "\n";
}
}
exit EX_SUCCESS;
Expand Down

0 comments on commit 0a6e3b6

Please sign in to comment.