CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced: Re: [cuboidgraphix] Help with Telnet commands.: Edit Log


Jan 22, 2009, 9:18 PM

Views: 7143
Re: [cuboidgraphix] Help with Telnet commands.

Cool, well done. One potential problem is an interval that occurs between the hours 23 and 00. Something like:

my $ConnectTime = "23:55:00";
my $DisconnectTime = "00:05:00";

You're going to drive Fish crazy if you keep quoting single scalars. Lines like this:

$CT = substr("$CT",1,8);

Are much better written without the double-quotes:

$CT = substr($CT,1,8);

Only use quotes to make strings.


I think you got this wrong:

$secs1 = (substr("$CT",0,2) * 360)

should be:

$secs1 = (substr("$CT",0,2) * 3600)

To convert hours into seconds you multiply by 3600 (60 * 60).

(This post was edited by KevinR on Jan 22, 2009, 9:21 PM)

Edit Log:
Post edited by KevinR (Veteran) on Jan 22, 2009, 9:21 PM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives