Timeout problem

2004-07-06 Thread Werner Otto
Hi All, I have the following script: #!/usr/bin/perl use IO::Socket; my $host=shift @ARGV or die 'need hostname'; my $port=shift @ARGV or die 'need port number'; my [EMAIL PROTECTED] or die 'need timeout';; my $socket=IO::Socket::INET->new(PeerAddr=> $host, PeerPort => $port, Proto =>

IO::Socket

2004-07-01 Thread Werner Otto
Hi All, I have the following problem. _Code:_ #!/usr/bin/perl use IO::Socket; my $host=shift @ARGV or die 'need hostname'; my $port=shift @ARGV or die 'need port number'; my $timeout=1; my $socket=IO::Socket::INET->new(PeerAddr=> $host, PeerPort => $port, Proto => 'tcp', Type =

Re: Subtracting Zero Dates

2004-06-18 Thread Werner Otto
. -Original Message- From: Werner Otto [mailto:[EMAIL PROTECTED] Sent: Fri 6/18/2004 3:28 AM To: [EMAIL PROTECTED] Cc: Subject: Subtracting Zero Dates Hi All, Does anyone know how to handle subtracting two dates where one might be 0 or no

Subtracting Zero Dates

2004-06-18 Thread Werner Otto
Hi All, Does anyone know how to handle subtracting two dates where one might be 0 or no time or blank? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Date and time calculation

2004-06-16 Thread Werner Otto
stions and came up with nothing. Could someone please give me some example code to do this. I'm sort of stuck! What have you tried, what didn't work or you didn't understand? Date::Calc Date::Manip DateTime All make this trivial. http://danconia.org -- Kind Regards, Werner Otto -- To un

Date and time calculation

2004-06-16 Thread Werner Otto
and posts on suggestions and came up with nothing. Could someone please give me some example code to do this. I'm sort of stuck! -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> &

Link refresh

2004-06-15 Thread Werner Otto
Sorry this might be off the topic. Is there anything that I can do in perl to: when I click on a link to refresh the page as I click on the hyperlink -- Kind Regards, Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Calling subs

2004-06-09 Thread Werner Otto
Hi All, How would I go about calling a sub from a script from another script. I am trying to call that sub just to get the values in my current script and then perform aditional logic, other than duplicating the process? -- Kind Regards, Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

String issue?

2004-05-24 Thread Werner Otto
Hi There, I am having trouble with string creation. I need to do something like: system("ping -s localhost 56 1"); This will echo: 64 bytes from localhost (127.0.0.1): icmp_seq=0. time=0. ms How do I get this echo'd value as a string value? I will be splitting this string up into s

String problem

2004-05-20 Thread Werner Otto
Hi there, I am trying to do the following: $string = system ("ping -a $hostname | cut -c20-30"); This result returns 0 which is suppose to indicate success. But it never proves me wrong it always stays un-changed at 0. More to the point. I am trying to store the value returned, which would be "i