1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Use 'use strict' in all Perl programs

This commit is contained in:
Peter Eisentraut
2016-12-04 12:00:00 -05:00
parent 175ff6598e
commit 933b46644c
10 changed files with 84 additions and 54 deletions

View File

@ -1,20 +1,23 @@
#!/usr/bin/perl
$integer = '[+-]?[0-9]+';
$real = '[+-]?[0-9]+\.[0-9]+';
$RANGE = '(\.\.)(\.)?';
$PLUMIN = q(\'\+\-\');
$FLOAT = "(($integer)|($real))([eE]($integer))?";
$EXTENSION = '<|>|~';
use strict;
$boundary = "($EXTENSION)?$FLOAT";
$deviation = $FLOAT;
my $integer = '[+-]?[0-9]+';
my $real = '[+-]?[0-9]+\.[0-9]+';
$rule_1 = $boundary . $PLUMIN . $deviation;
$rule_2 = $boundary . $RANGE . $boundary;
$rule_3 = $boundary . $RANGE;
$rule_4 = $RANGE . $boundary;
$rule_5 = $boundary;
my $RANGE = '(\.\.)(\.)?';
my $PLUMIN = q(\'\+\-\');
my $FLOAT = "(($integer)|($real))([eE]($integer))?";
my $EXTENSION = '<|>|~';
my $boundary = "($EXTENSION)?$FLOAT";
my $deviation = $FLOAT;
my $rule_1 = $boundary . $PLUMIN . $deviation;
my $rule_2 = $boundary . $RANGE . $boundary;
my $rule_3 = $boundary . $RANGE;
my $rule_4 = $RANGE . $boundary;
my $rule_5 = $boundary;
print "$rule_5\n";

View File

@ -2,6 +2,10 @@
# this script will sort any table with the segment data type in its last column
use strict;
my @rows;
while (<>)
{
chomp;
@ -10,11 +14,11 @@ while (<>)
foreach (
sort {
@ar = split("\t", $a);
$valA = pop @ar;
my @ar = split("\t", $a);
my $valA = pop @ar;
$valA =~ s/[~<> ]+//g;
@ar = split("\t", $b);
$valB = pop @ar;
my $valB = pop @ar;
$valB =~ s/[~<> ]+//g;
$valA <=> $valB
} @rows)