in reply to time2string

This script runs, but I noticed 2 things.
1. Running it complains about an unitialized value
at line 37, $prefix. Maybe add an else clause.
if ($time < 0) { $time = - $time; $prefix = "- "; }else{$prefix=''}

2. I'm getting a strange chr(2), "shaded box", printed out
as a separator between each field. In the example below
'a' is shown where I show a shaded box.
a8ah a53am a25as
I can see where it's coming from, it kindof gives it an
"odometer" effect. :-) Maybe remove the \002 's from
the push @data lines.

Replies are listed 'Best First'.
Re: Re: time2string
by rendler (Pilgrim) on Jul 21, 2002 at 22:49 UTC
    I've now got the variable declared as my $prefix = ''; Which should fix it? Or should I maybe make another variable to store the value that is going to be returned such as:
    my $return; $return = $prefix if $prefix; $return .= join ' ', @data; return $return;
    Also the \002 are used to produce bold text for IRC.