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
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
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
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
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
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
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
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
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
>
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
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
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
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, $!
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
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]
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,
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
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
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
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
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
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:
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:
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:
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
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
>
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
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
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
#! perl
# ==
# $Author: Jmk $
# $Date: 19.05.98 7:12 $
# $Archive: /Jmk/scripts/saa/process.pl $
# $Revision: 2 $
# ==
# shows the task list like the tas
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
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
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
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
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
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
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
&
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
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
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
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
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
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
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
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
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
>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
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.
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
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.
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
> 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
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
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
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
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
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
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
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
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
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
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
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-
>
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
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
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
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
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
@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
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
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
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]
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
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
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
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
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
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
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 - 100 of 127 matches
Mail list logo