Skip to content

Commit

Permalink
split: remnants of -?
Browse files Browse the repository at this point in the history
* Remove code for handling $opt{'?'} since this is not supported in getopt
* Update POD
* No intended functional change; -? would still print a warning + usage string
  • Loading branch information
mknos authored Oct 3, 2023
1 parent 48133eb commit fc360da
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions bin/split
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ else {
}
binmode $in;
## Byte operations.
if ($opt{b} and (! $opt{p}) and (! $opt{l}) and (! $opt{"?"})) {
if ($opt{b} and (! $opt{p}) and (! $opt{l})) {

my ($chunk, $fh);
my $count = get_count ($opt{b});
Expand All @@ -139,7 +139,7 @@ if ($opt{b} and (! $opt{p}) and (! $opt{l}) and (! $opt{"?"})) {
}

## Split on patterns.
elsif ($opt{p} and (! $opt{b}) and (! $opt{l}) and (! $opt{"?"})) {
elsif ($opt{p} and (! $opt{b}) and (! $opt{l})) {

my $regex = $opt{p};
my $fh = nextfile ($prefix);
Expand All @@ -151,7 +151,7 @@ elsif ($opt{p} and (! $opt{b}) and (! $opt{l}) and (! $opt{"?"})) {
}

## Line operations.
elsif ((! $opt{p}) and (! $opt{b}) and (! $opt{"?"})) {
elsif ((! $opt{p}) and (! $opt{b})) {

# default is -l 1000 (NOT 1k!)
my $fh;
Expand Down Expand Up @@ -215,10 +215,6 @@ interpreted as a Perl regular expression. The matching line will be
the first line of the next output file. This option is incompatible
with the B<-b> and B<-l> options.
=item -?
Short usage summary.
=back
If additional arguments are specified, the first is used as the name
Expand Down

0 comments on commit fc360da

Please sign in to comment.