change code to quiet perl warnings.

This commit is contained in:
kestes%walrus.com 2002-12-09 18:15:06 +00:00
Родитель 8623170463
Коммит 4d50a47fb6
2 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -25,8 +25,8 @@
# complete rewrite by Ken Estes, Mail.com (kestes@staff.mail.com).
# Contributor(s):
# $Revision: 1.10 $
# $Date: 2002-05-10 21:21:59 $
# $Revision: 1.11 $
# $Date: 2002-12-09 18:15:06 $
# $Author: kestes%walrus.com $
# $Name: $
@ -140,9 +140,10 @@ sub untaint_digits {
sub format_digits_human_readable {
my ($num) = @_;
my $char = "G";
my $break = 1000_000_000;
my $char = "G";
$char = "G";
if ($num >= $break) {
my $trunc = ( $num - ($num % $break) ) / $break;
$out = $trunc;
@ -151,7 +152,7 @@ sub format_digits_human_readable {
}
$break = $break / 1000;
my $char = "M";
$char = "M";
if ($num >= $break) {
my $trunc = ( $num - ($num % $break) ) / $break;
$out = $trunc;
@ -160,7 +161,7 @@ sub format_digits_human_readable {
}
$break = $break / 1000;
my $char = "K";
$char = "K";
if ($num >= $break) {
my $trunc = ( $num - ($num % $break) ) / $break;
$out = $trunc;

Просмотреть файл

@ -1,18 +1,20 @@
#!/usr/bin/perl
# $Revision: 1.2 $
# $Date: 2002-05-02 22:57:29 $
# $Revision: 1.3 $
# $Date: 2002-12-09 18:14:07 $
# $Author: kestes%walrus.com $
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/clientbin/show_time,v $
# $Name: $
$t=time();
print (
$out= (
"The current time on ".`hostname`. "\n".
"UnixTime: ".$t."\n".
"LocalTime: ".localtime($t)."\n".
"GMTime: ".gmtime($t)."\n".
"\n"
);
print $out;