Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions bin/join
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ while (@buf1 && @buf2) {
if ($unpairables[0] && @buf1) {
do{
print_joined_lines(shift @buf1, [])
} until !get_a_line(\@buf1, $fh1);
} while get_a_line(\@buf1, $fh1);
}
if ($unpairables[1] && @buf2) {
do{
print_joined_lines([], shift @buf2)
} until !get_a_line(\@buf2, $fh2);
} while get_a_line(\@buf2, $fh2);
}

unless (close $fh1) {
Expand Down Expand Up @@ -195,8 +195,9 @@ sub print_joined_lines {
# OPTIONS STUFF BELOW #
#######################
sub get_arg {
# $_ contains current arg
my ($arg,$opt) = shift;
# $_ contains VAL in -oVAL
my $arg = shift;
my $opt;
if (length) { $opt = $_ }
elsif (@ARGV) { $opt = shift @ARGV }
else {
Expand Down
Loading