IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 25, 2008, 11:19:19 AM (18 years ago)
Author:
bills
Message:

allow blank lines in the input. Fix usage message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/test/detect_query_create

    r18734 r18735  
    2626
    2727pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    28 pod2usage( -msg => "Required options: --input --output",
     28pod2usage( -msg => "Required options: --input --output --query_id",
    2929           -exitval => 3) unless defined $input and defined $output;
    3030
     
    223223        while (my $line = <$in>) {
    224224            $line_num++;
     225            chomp $line;
    225226            next if ($line =~ /^#/);    # skip comment lines
    226             chomp $line;
     227            next if !$line;             # skip blank lines
    227228            my @vals = split /$sep/, $line;
    228229            my $nvals = @vals;
     
    241242    my $ncols = @$colData;
    242243    while (my $line = <$in>) {
     244        chomp $line;
    243245        $line_num++;
    244246        next if ($line =~ /^#/);    # skip comment lines
    245         chomp $line;
     247        next if !$line;             # skip blank lines
    246248
    247249        my @vals = split /$sep/, $line;
Note: See TracChangeset for help on using the changeset viewer.