&price_from_to
&sec2h
&oct2h
- &format_amount
&mysql_exec
&table_get_no_primaries
&table_get_primaries
&db_csv2table
&key2id
&file_encoding
- &http_logs_argv
);
#@EXPORT = @EXPORT_OK;
}
-sub format_amount {
-#------------------------------------------------------------------------------
-# NB 14.05.09
-#------------------------------------------------------------------------------
-my $amount = shift @_;
- if ($amount =~ /\..*,/
- #or $amount =~ /\.\d\d\d/
- ) {
- $amount =~ s/\.//g;
- $amount =~ s/,/\./g;
- } elsif ($amount =~ /,.*\./) {
- $amount =~ s/,//g;
- } else {
- $amount =~ s/,/\./g;
- }
- return unless $amount =~ /^[\.\d]+$/;
-return $amount;
-}
-
sub mysql_exec {
#------------------------------------------------------------------------------
# NB 17.03.09
return $encoding;
}
-sub http_logs_argv {
-#------------------------------------------------------------------------------
-# NB 09.12.10
-#------------------------------------------------------------------------------
-my @logs;
-local $_;
-
- if (@ARGV and @logs = grep {-e $_ or $_ eq '-'} @ARGV) {
-
- } else {
-
- @logs = grep{$_} map{chomp($_);$_} `find /var/log/squid3/access*log 2>/dev/null` unless @logs;
-
- @logs = grep{$_} map{chomp($_);$_} `find /var/log/apache2/access*log 2>/dev/null` unless @logs;
-
- }
-
- return @logs;
-
-}
-
##############################################################################
1;
##############################################################################