Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: time2string

by zentara (Archbishop)
on Jul 21, 2002 at 21:56 UTC ( #183879=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://183879]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2023-12-02 12:11 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (16 votes). Check out past polls.