RE: 64 Bit ActivePerl

2005-06-15 Thread John Serink
Hi Paul: If you'll notice, this is a Win32 group. That is perl, on a Win32 platform, not perl on a Win64 platform. If you want the latter, you'll likely have to compile from source. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of P

RE: Using Net::SMTP with Authen:SASL

2005-06-27 Thread John Serink
This works: use strict; use warnings; use Net::SMTP; my $mailhost = "jim.bob.com"; my $mailobj = ""; if($mailobj = Net::SMTP->new($mailhost, Timeout=>10, Debug=>1)){ print("Connected to $mailhost\n"); } else { print("Could not connect to $mailhost\n"); die; } my $userna

perl 5.8.7, Win32 threaded Handles leak bug, bugzilla 35931

2005-06-27 Thread John Serink
Hi All: With regards to: This is perl, v5.8.7 built for MSWin32-x86-multi-thread (with 7 registered patches, see perl -V for more detail) Copyright 1987-2005, Larry Wall Binary build 813 [148120] provided by ActiveState http://www.ActiveState.com ActiveState is a division of Sophos. Built Jun 6

RE: sending mail in both win32 and UNIX

2005-07-10 Thread John Serink
Or, you could simply open the port 25 to the SMTP server and send the SMTP commands yourself... Very easy, just read the SMTP RFC. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Chris Wagner > Sent: Saturday, July 09, 2005 12:32 PM

RE: fork() and ithreads in AS Perl 5.8.6

2005-07-12 Thread John Serink
Hello Angus: > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Angus McIntyre > Sent: Wednesday, July 13, 2005 6:48 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: fork() and ithreads in AS Perl 5.8.6 > > > I'm writing a Perl progra

RE: comparing floating point numbers

2005-07-24 Thread John Serink
Comparing floating points means to ask whether one number falls within a RANGE of values. You have to say it like this: use strict; use warnings; my $bob = 630.239; my $test = 630.24; my $range1 = 0.001; my $range2 = 0.1; no warnings; if( ($test <= ($bob+$range1) ) && ($test => ($bob - $rang

RE: references

2005-07-25 Thread John Serink
Why don't you pass the parameters as references. They work like pointers in C kindof. Why do you want to reference your subroutine? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Tuesday, July 26, 2005 2:19 AM > To

RE: references of sub and params in a threads::shared variable

2005-07-25 Thread John Serink
Yup. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Tuesday, July 26, 2005 6:10 AM > To: Siebe Tolsma > Cc: perl-win32-users@listserv.ActiveState.com > Subject: references of sub and params in a threads::shared variable

RE: references - inject sub/params into longterm running thread

2005-07-25 Thread John Serink
process and it will crash. The leaking handles is a known bug when using threads on Win32. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 26, 2005 11:20 AM > To: perl-win32-users@listserv.ActiveState.com >

RE: [threads] Forced termination

2005-08-25 Thread John Serink
Just detach them and forget about them. other than that, I don't think there's a way to terminate them. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of ajpeck > Sent: Thursday, August 25, 2005 3:02 PM > To: Perl Win32 mail list > Subject: [thread

RE: [threads] Forced termination

2005-08-25 Thread John Serink
To: Perl Win32 mail list > Subject: Re: [threads] Forced termination > > > The problem is that I need to reclaim the memory resource of > the thread > that is not needed no more, so I can start off a new thread. > Thus detach > is not suitable in this case. > > Alun

RE: [threads] Forced termination

2005-08-25 Thread John Serink
You sure this works under windows? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Tom Pollard > Sent: Friday, August 26, 2005 2:17 AM > To: ajpeck > Cc: Perl Win32 mail list > Subject: Re: [threads] Forced termination > > > On Thu, 25 Aug 2005

RE: :Socket::INET question

2005-08-31 Thread John Serink
Title: Message You need to use the IO:Select module which makes the ports non-blocking. When you check the port for reading, it will indicate there is something to read. When you read it using sysread if it returns: 0 = the socket has disconnected. undef = there was an error on the handle, $!

RE: :Socket::INET question

2005-08-31 Thread John Serink
Make sure you set the reuse to 1. You could also try $return_val=$sock->shutdown(AF_INET); rather than close($sock); Cheers, John > -Original Message- > From: Peter Eisengrein [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 01, 2005 10:35 AM > To: John Serink; P

RE: Check for running process

2005-09-20 Thread John Serink
Title: Message my @jim=`tasklist`;   now parse jim and find with you're looking for. ALternatively: my @jim=`tasklist|find "whatyou'relookingfor"`;   Jim will likely contain only one entry now, the thing you're looking for.   :) John -Original Message-From: [EMAIL PROTECTED]

Adding values to hashes

2005-09-22 Thread John Serink
Hi All: I'm using strict and use warnings in my script and I read in a configuration file. I think parse it and I want to load some names and phone numbers into a hash like this: my %ToSend=('party',000); for(my $i=0;$i line 7. Use of uninitialized value in hash element at smstest_13.pl line 36,

RE: Adding values to hashes

2005-09-22 Thread John Serink
Actually, that was the problem. Cheers, John > -Original Message- > From: Reinhard Pagitsch [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 22, 2005 4:59 PM > To: John Serink > Cc: perl-win32-users@listserv.ActiveState.com > Subject: Re: Adding values to hashes

Making cmd.exe an ANSI compliant terminal

2005-10-03 Thread John Serink
Anybody know how to do this? I want to use Term::ANSIColor on a windoze box, but when I run this: use strict; use warnings; use Term::ANSIColor; print( color 'bold blue'); print( "This text is bold blue.\n"); print( color 'reset'); print("This text is normal.\n"); print(colored ("Yellow on magen

RE: perl packet manager problem

2005-10-04 Thread John Serink
Title: Message When I tried it: F:\perl\practice\VRS>ppm3PPM - Programmer's Package Manager version 3.2.Copyright (c) 2001 ActiveState Corp. All Rights Reserved.ActiveState is a division of Sophos.   Entering interactive shell. Using Term::ReadLine::Perl as readline library.   Type 'help' to

Cross platform issues

2005-10-06 Thread John Serink
Hi All: Ok, I need to use either Win32::Console or Term::ANSIScreen depending whether I'm on a Linux platform or Windoze box, so I do this: if($^O eq "MSWin32"){ # Check which OS print("Looks like its $^O\n"); require Win32::Console; } else { require Term::ANSIScreen; } Wor

RE: Cross platform issues

2005-10-06 Thread John Serink
een \n"; $console = Term::ANSIScreen->new(); } Now when I run it: D:\linux>perl eval1.pl Looks like its not Windoze Bareword "STD_OUTPUT_HANDLE" not allowed while "strict subs" in use at eval1.pl line 22. Execution of eval1.pl aborted due to compilation errors. Sa

RE: Cross platform issues

2005-10-06 Thread John Serink
quot;Term::ANSIScreen \n"; $console = Term::ANSIScreen->new(); } Don't really like have the 'no strict' in there but it's a work around unless we can come up with something more elegant. Cheers, John > -Original Message- > From:

RE: how to interact with an endless loop

2005-10-06 Thread John Serink
Check the IO::Select docs... they work only for socket on Win32, you can't use them from file handles including STDIN unfortunately. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Su, Yu (Eugene) > Sent: Friday, October 07, 2005 3:

RE: send a IP frame with a non owned IP as source

2005-10-12 Thread John Serink
Title: Message You'll have to hack Winsock. You could hack the stack in Linux but Gates doesn't give his source code out so. :) John -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MarkusSent: Wednesday, October 12, 2005 3:40 PMTo:

RE: Checking for internet connection

2005-11-01 Thread John Serink
It depends on how you are connected to the internet. if its dialup, you could do this: my @bob = `ipconfig/all`; my $jim=""; foreach $jim @bob { if($jim=~m/ppp/i){ last; } } if its not dialup, you can do something similar looking for the field "IP Address" and checking if the stuff after th

RE: Reading from TCP socket using IO::Select

2005-11-07 Thread John Serink
Hi Ross: You must use sysread with IO select. Do NOT use as its buffered IO. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ross Draper > Sent: Tuesday, November 08, 2005 4:33 AM > To: perl-win32-users@listserv.ActiveState.com >

RE: ActivePerl 5.8.7.815 released

2005-11-15 Thread John Serink
Anyone know if the leaking handles on win32 when using shared arrays with threads is fixed? It wasn't mentioned in the change log. Cheers, john > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Jan Dubois > Sent: Wednesday, November 16, 2005 4:21

RE: ActivePerl 5.8.7.815 released

2005-11-15 Thread John Serink
9:30 AM > To: John Serink; activeperl@listserv.ActiveState.com; > perl-win32-users@listserv.ActiveState.com > Subject: RE: ActivePerl 5.8.7.815 released > > > On Tue, 15 Nov 2005, John Serink wrote: > > Anyone know if the leaking handles on win32 when using > share

RE: How to send mail from Perl

2005-11-18 Thread John Serink
Title: Message net::SMTP -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxmelbin Neson (RBIN/EDM3)Sent: Friday, November 18, 2005 2:57 PMTo: [EMAIL PROTECTED]; perl-win32-users@listserv.ActiveState.comSubject: How to send mail fr

RE: CPU Usage in Percentages for Each Process?

2005-11-27 Thread John Serink
#! perl # == # $Author: Jmk $ # $Date: 19.05.98 7:12 $ # $Archive: /Jmk/scripts/saa/process.pl $ # $Revision: 2 $ # == # shows the task list like the tas

RE: Detecting memory leaks in perl scripts

2005-11-27 Thread John Serink
perfmon or taskmanager. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Sandhu, Suchindra > Sent: Saturday, November 26, 2005 12:04 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: Detecting memory leaks in perl scripts > > > Greet

RE: Executing an external program from a perl scrip.

2005-12-05 Thread John Serink
First: use "\" not "/". Second: You have to escape the "\" with a second "\" when using double quotes. Your line needs to read: $sys="C:\\antiword\\antiword.exe -t -w 1 document.doc > C:\\Inetpub\\wwwroot\\somedir\\document.txt"; That shou'd work. Alternatively, you could do it this way: $sy

RE: Inet::Socket::INET's line read fails

2005-12-05 Thread John Serink
Use sysread. You might want to use the IO:Select module to check if the call will block before calling... gives you a bit more control. Cheers, john > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Foo Ji-Haw > Sent: Tuesday, December 06, 2005 12

RE: how to detect a disconnected socket?

2005-12-18 Thread John Serink
Ok, if you're using sockets I strongly recommend you ALWAYS using sysread and syswrite as they baypass standard IO buffereing. Be careful with sysread, it cand and will return partial reads, you MUST be prepared for that. Unless you want your program to block on sysread, you should use IO::Select

RE: how to detect a disconnected socket?

2005-12-19 Thread John Serink
t: Monday, December 19, 2005 4:42 PM > To: John Serink > Cc: perl-win32-users@listserv.ActiveState.com > Subject: Re: how to detect a disconnected socket? > > > John Serink wrote: > > >Ok, if you're using sockets I strongly recommend you ALWAYS using > >sysread and

RE: How to quit when Windows shut down?

2005-12-19 Thread John Serink
C:\>shutdown /? Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [ -d up:xx:yy] No args Display this message (same as -?) -i Display GUI interface, must be the first option -l

RE: How to quit when Windows shut down?

2005-12-20 Thread John Serink
You'll have to install the resource kit. You canget the tools at www.microsoft.com > -Original Message- > From: Octavian Rasnita [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 20, 2005 4:11 PM > To: John Serink; Ted Zeng; perl-win32-users@listserv.ActiveState.com &

MS SMTP and MS FTP server information

2005-12-28 Thread John Serink
Hi All: How can I find this stuff with Perl? I need to dump the SMTP and ftp settings, what MS calls properties, from a machine for a report but the setup is done using IIS with GUIs. Anyone know how to do this? Where to get the information from? I've scoured the registry and can't find where Gat

RE: MS SMTP and MS FTP server information

2005-12-31 Thread John Serink
Hi Steven: Ok cool, I got it going with this: use Win32::OLE qw (in); use strict; use warnings; my $IIS = Win32::OLE->GetObject("IIS://johnathlonxpm"); my $PathList = $IIS->GetDataPaths("AuthAnonymous",0); print("$PathList"); print("\n"); my $thislong = scalar(@$PathList); print("This long is

RE: Info on reading COM ports

2006-01-08 Thread John Serink
Win32::Serialport > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Rajesh Vattem > Sent: Saturday, January 07, 2006 2:54 PM > To: Perl-Win32-Users@listserv.ActiveState.com > Subject: Info on reading COM ports > > > > Hi, > I am looking for ways

threads and consoles

2006-01-16 Thread John Serink
Hi All: Is there a way for a thread to have its own console separate from the calling process? Cheers, john ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Battery info on a laptop

2006-03-04 Thread John Serink
Use the appropriate WMI classes with the Win32::OLE module. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of andrew Black > Sent: Sunday, March 05, 2006 2:10 AM > To: perl-win32-users > Subject: Battery info on a laptop > > > Hi > Does anyone kn

RE: Battery info on a laptop

2006-03-05 Thread John Serink
Use this as a hack template till you get your head around it: #!perl # Simple Perl Script to illustrate use of WMI to gather system information # and display it in the same format at the Windows Management Console use Win32::OLE qw(in with); use Win32::Registry; # Pick a host that you have the n

RE: Change network interface parameters via Perl

2006-03-07 Thread John Serink
You could just use netsh. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Paul Sobey > Sent: Monday, February 28, 2005 7:18 PM > To: Perl-Win32-Admin > Cc: Perl-Win32-Users > Subject: RE: Change network interface parameters via Perl > > > Ass

RE: old messages?

2006-03-07 Thread John Serink
Yup. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Chris > Sent: Wednesday, March 08, 2006 6:55 AM > To: 'Chris Wagner'; perl-win32-users@listserv.ActiveState.com > Subject: RE: old messages? > > > Did anyone else also just receive a boat loa

RE: ActivePerl 5.8.8.816 released

2006-03-13 Thread John Serink
Has the handles leak on Win32 when using shared variables with threads been fixed? :) John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Jan Dubois > Sent: Tuesday, March 14, 2006 7:42 AM > To: activeperl@listserv.ActiveState.com; > perl-win3

RE: System resources used by Perl script

2006-03-14 Thread John Serink
>From the Active per docs: Devel::DProf - a Perl code profiler * NAME * SYNOPSIS * DESCRIPTION * PROFILE FORMAT * AUTOLOAD * ENVIRONMENT * BUGS * SEE ALSO NAME Devel::DProf - a Perl code profiler SYNOPSIS perl -d:DProf test.pl DESCRIPTION The Devel::DP

RE: ActivePerl 5.8.8.816 released

2006-03-15 Thread John Serink
Hi All: After installing perl 5.8.8-816 I ran my handles leak program to see if perl is still leaking handles when using shared arrays and hashes with threads. Problem is, I don't have an answer on whether it still leaks handles because the interpreter crashes in the midst of lunching the threads.

RE: Implementing or Emulating TSRs in Win32 Console Apps

2006-03-16 Thread John Serink
Hi Veli: There are several way to do what you want. What not use threads? You could use IO::Select as well but that only works for sockets on Win32 unfortunately, in Linux it works with console handles as well. Threads is the most straight forward but I've had problems with threads crashing the

FW: ActivePerl 5.8.8.816 released

2006-03-16 Thread John Serink
Hi All: After installing perl 5.8.8-816 I ran my handles leak program to see if perl is still leaking handles when using shared arrays and hashes with threads. Problem is, I don't have an answer on whether it still leaks handles because the interpreter crashes in the midst of lunching the threads.

RE: Perl book sale at Suntec City (Singapore)

2006-03-26 Thread John Serink
Where at Suntec? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Foo Ji-Haw > Sent: Monday, March 27, 2006 10:01 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: Perl book sale at Suntec City (Singapore) > > > Ok, I know this is re

RE: accurate timing in windows

2006-03-29 Thread John Serink
You need to be counting actual HW clock ticks. Win32::GetTickCount() will return the HW timer count...believe its incremented every millisecond. SW timers won't work. Also, you can't use sleep for anything other than integer seconds. If you want to sleep for periods smaller than a second, you need

RE: ActivePerl 5.8.8.817 released-Win32 Threads Leaking handles

2006-03-29 Thread John Serink
Hello Jan and Fellow Users: The Win32 threads leaking handles bug is fixed! Yippie! OUTSTANDING! Well done development team. Have tested it on my leaking handles script and my production code, looks good. The number of handles open jumps when the threads are launched and as the detached threads d

RE: :Select perl question

2006-04-06 Thread John Serink
You can't. IO::Select with pipes and file handles is only supported on Unix. IO::Select on Win32 only works with Sockets. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Thursday, April 06, 2006 2:10 PM > T

Win32 Perl Threads SLOW memory leak.

2006-04-13 Thread John Serink
Hi All: The attached script is a performance test model I use for a production script I have that uses sockets to connect to various targets once per minute. It used to leak 2 handles per thread per run but that has been fixed with perl 5.8.8-817. Now that the handles leak is fixed I have been obs

RE: Non-blocking IO?

2006-04-17 Thread John Serink
Win sockets on Win32? not really, the only choice you have is IO::Select. :) John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Lyle Kopnicky Sent: Tuesday, April 18, 2006 12:22 AM To: Perl-Win32-Users@listserv.ActiveState.com Subject: Non-blocking IO? Hi

RE: Easy One

2006-05-01 Thread John Serink
REGEX! > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Ng, Bill > Sent: Tuesday, May 02, 2006 3:55 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: Easy One > > > Real simple, > > I have a string, "$a" for arguments sake, th

RE: Network Timeouts

2006-05-12 Thread John Serink
You're only option is to spawn threads and detach them. Have them write their results to a shared hash or something and define your own timeout...if you don't see the result from that thread ID in X seconds, declare it timed out and forget about it. When it actually does timeout is will error and t

RE: Win32::SerialPort problem

2006-06-01 Thread John Serink
I'm running 5.8.8-817 and it appears to be included in this one. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of David Ressler > Sent: Thursday, June 01, 2006 9:28 AM > To: Perl List > Subject: Win32::SerialPort problem > > > I'm trying to use

Net-ssh-W32Perl

2006-06-09 Thread John Serink
Hi All: Got a small problem I can't figure out here. All I want to do is log into the SSH server, grabe the banner test and exit. The banner text contains some HW status I'm trying to capture. Script is below: use strict; use warnings; use Net::SSH::W32Perl; my $host = '220.255.171.11'; my $user

RE: what's the difference between .pm and .pl ???

2002-01-14 Thread John Serink
It's a package. See Deitel, "Perl, How to Program", pg. 200. section 6.14, 'Namespaces, packages and Modules'. > -Original Message- > From: tony [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 15, 2002 9:03 AM > To: [EMAIL PROTECTED] > Subject: what's the difference between .pm and .p

RE: Newbie book

2002-05-12 Thread John Serink
I used "PERL, How to Program", Deitel, Deitel, Nieto and McPhile. Good book and source chould comes with it. I still use it as a reference. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 10, 2002 11:23 PM > To: [EMAIL PROTECTED] > Subject:

RE: Beating the fork() horse to death...

2002-05-12 Thread John Serink
Title: Beating the fork() horse to death... You have to remember that at the time of the fork a snapshot is taken of the parent process's variables and memory and reproduced for the child. If you want the parent to know the results of whatever you do in the child, you have three options: 1. W

RE: Re[2]: Beating the fork() horse to death...

2002-05-13 Thread John Serink
That is handy to know. Thanx for the info. Cheers, John > -Original Message- > From: Eugeniy Ogloblin [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 13, 2002 2:41 PM > To: [EMAIL PROTECTED] > Subject: Re[2]: Beating the fork() horse to death... > > > Hello John, > > Monday, May 13, 20

RE: Establishing an Internet Connection

2002-06-23 Thread John Serink
Use 'rasdial' from a dos session called from your perl script.   Cheers, john -Original Message-From: Eric Robertson [mailto:[EMAIL PROTECTED]]Sent: Friday, June 14, 2002 12:21 AMTo: [EMAIL PROTECTED]Subject: Establishing an Internet Connection I've written a program to

RE: :Telnet

2002-09-17 Thread John Serink
Yes, it works fine. > -Original Message- > From: Jitendra Soam [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 9:00 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: NET::Telnet > > > Is it possible to use Net::Telnet module to telnet into > Windows machine > runn

RE: NET::Telnet

2002-09-17 Thread John Serink
First, if you are telnetting from a non Windoze PC, you must turn off NTLM authentication on the host. This works on an NT box: use Net::Telnet; use strict; use warnings; my $telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die'); my @jim=""; my $frank=""; $telnet->open('192.168.174.108'); $tel

RE: Win32 show nothing

2002-10-09 Thread John Serink
Don't you need to put in a 'Main loop()" or 'run main' command at the end to start the event loop? > -Original Message- > From: (Aben) Roman Fordinál [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 10, 2002 3:02 PM > To: [EMAIL PROTECTED] > Subject: Win32 show nothing > > > > thi

RE: change IP address

2002-11-11 Thread John Serink
boot. Windows 2000 does, though. > > > -Original Message- > > From: Marcos Lorenzo [mailto:marcos@;it.uc3m.es] > > Sent: Monday, November 11, 2002 8:45 AM > > To: [EMAIL PROTECTED]; > > [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: Re: change

RE: Newbie in Socket Programming

2002-11-13 Thread John Serink
IO:Socket. If you want to use psuedo 'non-blocking' sockets(windows support for fork was very buggy last time I tried it) you'll have to multiplex the socket calls using IO:Select. There are many resources on the web for both. Cheers, John > -Original Message- > From: Gajendra Mehta [ma

RE: :Telnet on Win2K

2002-11-27 Thread John Serink
I think no one has got this to work yet because none of us has banged our head hard enough onto the desk top. And all this just to remotely power down a Win2K box.:) I'll post what I come up with. Cheers, john > -Original Message- > From: Allegakoen, Justin Devanandan > [mailto:[EMAIL P

Net::Telnet on Win2K

2002-11-27 Thread John Serink
Hi All: Sorry to be sending this to both Win32-Admin and Win32-users but trying to solicit advice from as many parties as possible. Also, apologies for this being so long. My problem: Differences in the operation of the Win2K Telnet Server (included with Win2K) and the Telnet server form the Win

RE: Net::Telnet on Win2K

2002-11-27 Thread John Serink
> Sent: Thursday, November 28, 2002 12:56 PM > To: John Serink; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: Net::Telnet on Win2K > > > John, > > The problem is outlined in the Net:Telnet documentation. The > "loads of > gibberish" is ANSI terminal

RE: Reboot windows 2000 box

2003-01-19 Thread John Serink
Use the windoze 2000 resource kit command shaurdown. Or, Dee www.roth.net and look at the Win32 Administrators module. > -Original Message- > From: Norris, Joseph [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 18, 2003 4:31 AM > To: Perl Win32 Users (E-mail) > Subject: Reboot windo

RE: *nix to Window 2000 sockets communication

2003-01-29 Thread John Serink
Don't remember your original question but Do you want a multi-user socket server on the Win2K box or just a single user? Cheers, John > -Original Message- > From: Jeff Slutzky [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 30, 2003 11:49 AM > To: [EMAIL PROTECTED] > Subject: *ni

RE: Having problems with Net::Telnet

2003-03-03 Thread John Serink
Did you install the module using PPM? What platform are you running it on? > -Original Message- > From: Lupi, Guy [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 04, 2003 7:22 AM > To: '[EMAIL PROTECTED]' > Subject: Having problems with Net::Telnet > > > Please excuse me if this is an e

RE: read binary file

2003-05-29 Thread John Serink
You Read a binary file the same way you read any other file. Slurp it into an array, piece of cake. If you want to 'convert' the binary, you use the pack function. Find the pack combination that works for you and then chew on the array of stuff you just slurped. When saving a file in Windoze, y

RE: read binary file

2003-05-29 Thread John Serink
Hi Bill: >> You Read a binary file the same way you read any other file. >Slurp it into an array, piece of cake. > >That's only partly true. You must specify binmode when >reading the file >or your binary data containing 0x0D or 0x0A will be >interpreted as CR and LF >in which case the CR will

RE: :Telnet and Term Type

2003-07-21 Thread John Serink
I think you do this with options but some of that is not yet supported. You may be able to 'fool' the other side by finding out what makes a TVI925 differnt from a VT100 and emulating that with some of the control character options.   Cheers, John     -Original Message-From: Andrew

RE: CPU Utilization allways on 100% when executing perl scripts

2003-08-01 Thread John Serink
Whatever the script is doing, make sure you are using blocking calls for your IO(thus the script will pause) or putting a 'sleep' in there somewhere. >-Original Message- >From: Markus Dubois [mailto:[EMAIL PROTECTED] >Sent: Thursday, July 31, 2003 8:07 PM >To: [EMAIL PROTECTED] >Subject

RE: Interested in thoughts on how to hand off to mirror of script on another server

2003-08-14 Thread John Serink
Don't use email, use sockets. Have all the scripts connect to each other and send status updatessay every 2 minutes. If a connection closes or if a script detects that shutdown is coming, it updates a message. Any connection will immediately detect if the TCP connection on the other side goe

RE: (no subject)

2003-09-09 Thread John Serink
Buy a book or go to one of the tutorial sites. Use 'perl tutorial' as a search term in google. -Original Message-From: Hamad alkhalaf [mailto:[EMAIL PROTECTED]Sent: Monday, September 08, 2003 5:50 AMTo: [EMAIL PROTECTED]Subject: (no subject) hi, i was woundering if any

RE: serial port, very lost,

2004-10-30 Thread John Serink
Hiyah: One thing at a time Me lad! First, null modem cable and get 2 PC's talking over the serial port. Then introduce yourself to the pack/unpack commands to convert text to binary/hex/etc and back. Then try and write the code to send to your thinggy. You might also want to use a terminal pr

RE: Formatting seconds help

2004-11-02 Thread John Serink
if($seconds/60 >=1){ $mintes=int($seconds/60); $seconds=$seconds-$minutes*60; } else { $minutes = 0; } Do the same thing for 3600 seconds and you'll have the same for hours. Do the same for 86400 and you'll have the same for days... Etc. > -Original Message- >

Max Number of threads?

2004-11-17 Thread John Serink
Hi All: Anyone know what the maximum number of threads a Win32 perl app can spawn? Cheers, John ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: Max Number of threads?

2004-11-17 Thread John Serink
ED] On > Behalf Of $Bill Luebkert > Sent: Thursday, November 18, 2004 9:37 AM > To: [EMAIL PROTECTED] > Subject: Re: Max Number of threads? > > > John Serink wrote: > > > Hi All: > > > > Anyone know what the maximum number of threads a Win32 perl app ca

RE: Win32::SerialPort and thread

2004-11-23 Thread John Serink
You don't need to use threads to do this. The comm buffers are filled for you behind the scenes with Win32::Serialport. You can use threads if you want but there is no need. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Lin Jingx

RE: Blocking ports

2004-12-08 Thread John Serink
Just open a single client server on the ports you don't what anyone to use You'll have to do it in a separate thread however and that could start to consume resources...else it will block waiting for an accept. Or, you could create server using the IO::Select method and wait for connects but

RE: run a process as System account

2004-12-08 Thread John Serink
Win32::AdminMisc See www.roth.net. > -Original Message- > From: [EMAIL PROTECTED] [mailto:perl- > [EMAIL PROTECTED] On Behalf Of Marie-eve URVOY > Sent: Wednesday, December 08, 2004 5:34 PM > To: Paul Sobey > Cc: Perl-Win32 > Subject: RE: run a process as System account > > I think I can

RE: program probe

2004-12-09 Thread John Serink
@bob = `netstat -a -o`; Use a regex to sift to the array bob to find the PID of interest. Cheers, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Friday, December 10, 2004 8:58 AM > To: Perl-Win32 > Cc: [EMAIL PRO

RE: get a list of installed programs and path to exe.

2004-12-09 Thread John Serink
Go to the registry and peel it out of there. Win32::TieRegistry is what you're after. Have fun, John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Friday, December 10, 2004 9:32 AM > To: Perl-Win32 > Cc: [EMAIL PROTEC

RE: Is there a way to execute Windows/DOS command-line executableremotely from a linux box?

2004-12-09 Thread John Serink
tes? > > If that won't work, would anyone have any suggestions on a > work around? > > Thanks in advance, > Jim > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Thursday

RE: Perl for 64 bit XP

2004-12-16 Thread John Serink
If you're on a Linux box, just compile from source at 64bits. If you're on a Win32 box running XP 64, and you want 64bit perl, again, compile from source. Not sure how stable the Win32 Modules will be on 64 bits. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]

RE: how to send mail from Win32 Perl using SMTP authentication?

2004-12-19 Thread John Serink
use strict; use warnings; use Net::SMTP; my $mailhost = "mail.bob.com"; my $mailobj = ""; if($mailobj = Net::SMTP->new($mailhost, Timeout=>10, Debug=>1)){ print("Connected to $mailhost\n"); } else { print("Could not connect to $mailhost\n"); die; } my $username = "[EMAIL

RE: Binary Data File Question

2004-12-19 Thread John Serink
Check the perl docs for "pack" and "unpack". Everything you need is there. Cheers, john > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Leroy G. Blimegger Jr. > Sent: Sunday, December 19, 2004 10:01 PM > To: [EMAIL PROTECTED] > Subject: Binary

New perl build: 5.8.6

2004-12-20 Thread John Serink
Hi All: Just installed the new perl build, thought it would fix the leaking Win32 Handles with threads. It didn't. Perl is still leaking handles, 2 per thread when using shared hashes or arrays. Cheers, John John Edward Serink Product Applications Engineer, Infrastructure Systems Trimble

RE: Perl-Win32-Users Digest, Vol 11, Issue 14

2004-12-28 Thread John Serink
Use strict; Use warnings; my @jim=`bob.bat`; print(@jim); Will run bob.bat and capture all output to @jim. Note, those are back ticks, above the tab key not single quotes. :) John > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of CHIDIPI, RAM

RE: :telnet question

2004-12-30 Thread John Serink
Telnet server on Windows NT works fine with Net::Telnet, on Win2K No as Win2K using ANSI formatting which I've not figured a way to turn off. Also works fine against a Ciso router. WinXP never tried. Cheers, john > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED

getsockopt

2005-01-06 Thread John Serink
Hi All: Anybody know how to properly unpack this: my $linger = getsockopt($sock,SOL_SOCKET,SO_LINGER); I've tried every option but I can't make sense of the response. $linger is 4 bytes long according to length($linger) so it did return... I just can't figure out how to unpack the response. Have

RE: getsockopt--Solution on Win32

2005-01-06 Thread John Serink
20 seconds Linger is ? x Length of linger is 4 Length of linger after substr is 2 Length of firstbyte after substr is 2 The length of linger unpacked is 3 The SO_LINGER secondbyte return value is 120 The length of firstbyte unpacked is 1 The SO_LINGER firstbyte return value is 1 Whi

  1   2   >