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
6 changes: 4 additions & 2 deletions bin/join
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use constant EX_SUCCESS => 0;
use constant EX_FAILURE => 1;

my $Program = basename($0);
my $VERSION = '1.1';
my $VERSION = '1.2';

sub help {
warn "$Program (Perl Power Tools) $VERSION\n";
Expand Down Expand Up @@ -268,12 +268,14 @@ sub get_options {
}
elsif (s/^-e//) { $e_string = get_arg('e') }
elsif (s/^-(?:j?([12])|j)//) {
my $file = $1;
my $field = get_numeric_arg('j');
if ($field == 0) {
warn "fields start at 1\n";
help();
}
if ($1) { ($1 == 1 ? $j1 : $j2) = $field}
$field--; # treat as zero-based
if ($file) { ($file == 1 ? $j1 : $j2) = $field}
Comment thread
briandfoy marked this conversation as resolved.
else { $j1 = $j2 = $field }
}
elsif (s/^-o//) { get_field_specs() }
Expand Down
Loading