RE: Weird behaviour with Mozilla Firefox

2005-07-13 Thread Kamphuys, ing. K.G. (Koen)
Bill wrote:

> You could try adding this to the front of your code:
>
>BEGIN { use CGI::Carp qw(fatalsToBrowser); }
>
>I would move the
>   print "Content-Type: text/html\n\n";
>to that begin block also to make sure it gets out before anything else.
>
>Try making a smaller hello world script that fails and post it to make
>sure it's not a server misconfig problem.  Your current script is too
>big to mess with and doesn't have strict or warnings turned on.

Thanks Bill, brilliant move to have a BEGIN block to send out the content
type.  Why are solutions so simple that I don't think of them myself.  I
manage to get some neat errors messages now that indicate that a module
called misbehaves.  I know which module it is but it's not called in the
script and why it only misbehaves in Mozilla is strange so I have some more
puzzling to do.

Yeah and I know my script is messy and complex (it contains a 4-dimensional
internal data set) and it does not require the standards for neat
programming.  Sorry 'bout that - it's 6 years old and I never learned since.
:-/

Thanks Bill for your help.

-- 
Koen Kamphuys
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread David Dick



Hugh Loebner wrote:

My previous message was attached to the wrong posting.

I doubt very much whether there is any occasion where gotos are "most
appropriate."   Please provide an example.

Check ot http://www.acm.org/classics/oct95/  "Go To Statement
Considered Harmful" by Edsger W. Dijkstra



of course, this has been discredited in the following discussion 
http://kerneltrap.org/node/553/2131, for languages that do not have the 
equivalent of last/next type constructs for exiting loops in the middle 
of the loop (like C). it's a bit harder to find a justification while 
coding in perl. :)

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread $Bill Luebkert
Hugh Loebner wrote:

> My previous message was attached to the wrong posting.
> 
> I doubt very much whether there is any occasion where gotos are "most
> appropriate."   Please provide an example.
> 
> Check ot http://www.acm.org/classics/oct95/  "Go To Statement
> Considered Harmful" by Edsger W. Dijkstra

In structured programming practice, a goto would be totally inappropriate.

But ...  when you look at how a switch is implemented in actuality, it's
full of goto's.

I guess the point is that you should leave the gotos to the underlying
generated compiler code and not use it yourself.  But if your language
is lacking on suitable constructs, you may be forced to use a goto just
to save all the otherwise unnecessary code to go structured.

My suggestion - avoid if possible - else use cautiously and infrequently.

> On 7/13/05, Michael Erskine <[EMAIL PROTECTED]> wrote:
> 
>>On Wednesday 13 July 2005 13:30, Hugh Loebner wrote:
>>
>>>Why on earth are you using a goto statement? They are pernicious.
>>
>>On the contrary, a goto is often most appropriate in expressing clear program
>>flow.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Error with the program logic

2005-07-13 Thread suzi masumi
---
Dear Guru;
I have a problem with the code below, the program runs fine with the
following situation,

Lecturer Option

1- When user type in the " Login name", " Secret question" , " Secret
answer"  and choosing option as "Lecturer" .
2- The table name "Wusers" will called and selected where the
loginame="Login name"
   2-1 Loop (Display the form for the user input login name, secret
question, secret answer again)

3-if match then compare "secretquestion","secretanswer", with  the "
Secret question", "Secret answer"  that the user have entered.
4-If all matched then call the " New _password_form" , and the user
have to enter the new-password two times, if all match then the new
password which just entered by user will save into the Wusers table.
  1- Loop (display New password_form again if not match)

but my program not display the New_password_form again if the input of
two password not match, however it instead display the Main_form,
which is asked user to enter the login name, secret question, secret
ansewer instead.

Thank very.
--
Wusers 
secretquestion,secretanswer, loginame, password





#!/perl/bin/perl

use strict;
use warnings;
use CGI qw( :standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use DBI;
use users;
use vars qw($error_message $color1 $color2 $color3 $error_password);

##
my $sth= $dbh->prepare('SELECT userid from wusers');
   $sth->execute();
my (@choose_course);

while(my @us1=$sth->fetchrow_array){

push(@choose_course,$us1[0]);   
}   
###

my $loginame=param('LOGIN_NAME');
my $secret_answer=param('SECRET_ANSWER');
my $secret_question=param('SECRET_QUESTION');
my $option=param('OPTION');
my $course=param('COURSE');

$color1="black";
$color2="black";
$color3="black";


if(param('FORGET_PASSWORD') && param('OPTION') eq "Lecturer")
{

my $lecturer_rec=$dbh->prepare("SELECT * FROM Wusers WHERE
Loginame=?") or &dienice("Error");
   $lecturer_rec->execute($loginame) or &dienice("Can not find the
database, whether connection error or ...");
if(my $rec_lec=$lecturer_rec->fetchrow_hashref)
{
if($rec_lec->{secretquestion} ne $secret_question)
{
$error_message.="Please enter 
the secret question
correctly!";
$color2="red";

}
if($rec_lec->{secretanswer} ne $secret_answer)
{
$error_message.="Please enter 
the serect answer
correctly!";
$color3="red";
}

if($error_message eq "")
{

if(param('CREATE_NEW_PASSWORD')){
my $password1=param('NEW_PASSWORD1');
my $password2=param('NEW_PASSWORD2');

if((length(param('NEW_PASSWORD1')) < 6) 
||
(length(param('NEW_PASSWORD2')) < 6 ) || (param('NEW_PASSWORD1') ne
param('NEW_PASSWORD2')))
{
$error_password="The passowrd 
doesnt mucht";
&new_password_form;
}

if($error_password eq "")
{
my $record_lecturer=do("UPDATE 
Wusers SET password='$password1'
WHERE loginame='$loginame'");
&success;

}
else
{
$error_password="The";
&new_password_form;
}
}
else
{
&new_password_form;
}

}
else
{
&main_form;
}
}

else
{
$color1="red";
$color2="red";
$color3="red";
$error_message= "Please enter your 
login name
cor

Re: Change in "goto" behavior

2005-07-13 Thread Hugh Loebner
My previous message was attached to the wrong posting.

I doubt very much whether there is any occasion where gotos are "most
appropriate."   Please provide an example.

Check ot http://www.acm.org/classics/oct95/  "Go To Statement
Considered Harmful" by Edsger W. Dijkstra


On 7/13/05, Michael Erskine <[EMAIL PROTECTED]> wrote:
> On Wednesday 13 July 2005 13:30, Hugh Loebner wrote:
> > Why on earth are you using a goto statement? They are pernicious.
> 
> On the contrary, a goto is often most appropriate in expressing clear program
> flow.
> 
> Regards,
> Michael Erskine
> 
> --
> Kinkler's First Law:
>  Responsibility always exceeds authority.
> 
> Kinkler's Second Law:
>  All the easy problems have been solved.
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Unexpected SIGQUIT

2005-07-13 Thread Lyle Kopnicky

Lyle Kopnicky wrote:


Hi folks,

I've written my program to trap a SIGQUIT and gracefully exit, because 
that's what it gets if it's being run in a command prompt and I close 
it.  It will do the same for a SIGINT (Ctrl+C).


Sorry, I meant to say gets a SIGQUIT on user logout or system shutdown.  
It gets a SIGHUP when I close the command prompt.




It runs as an HTTP server, so it's supposed to stay up continuously.  
I am launching it through an 'at' command in the morning (the server 
reboots each night).


For some reason, on some occasions, the program is receiving a SIGQUIT 
and shutting down.  I know this because it logs that fact.  This 
happened, for example, last Wednesday and today.


Why would a System process started by the scheduler receive a 
SIGQUIT?  I don't believe anyone's going in there trying to kill it.


I could solve this problem by making it ignore SIGQUIT, but I wanted 
it to behave gracefully when I close a command prompt from which I am 
running it.  I would rather find out why it is receiving this signal.


I mean, when the system shuts down.  But, it doesn't always seem to get 
that SIGQUIT when the system shuts down, either.  :(



Any ideas?


--
Lyle Kopnicky
Software Project Engineer
Veicon Technology, Inc.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Problem With Win32::OLE and InternetExplorer.Application

2005-07-13 Thread $Bill Luebkert
StoneBeat wrote:
> Hi, i am triying to do a POST request with InternetExplorer.Application but 
> the object refuses to do it and always does a GET request.
> 
> Searching in MSDN i have found :
> 
> http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/navigate.asp
> 
> and my Code is :
> 
> use Win32::OLE qw(EVENTS); 
> use strict ;
> 
> my $IE  = Win32::OLE->new("InternetExplorer.Application");
> 
> my $respuesta = "X" x 2000 ;
> 
> 
> $IE->Navigate('http://192.168.7.1',0,'_BLANK',$respuesta,undef);

Why not use LWP instead or do you need the browser window ?

Maybe a little background on what you're trying to do.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Weird behaviour with Mozilla Firefox

2005-07-13 Thread $Bill Luebkert
Kamphuys, ing. K.G. (Koen) wrote:
> Hi all,
> 
> I have a weird problem using a script in a CGI environment together with
> Mozilla Firefox (1.0.3) that, to me, makes no sense at all, but I hope it
> does to you. 
> 
> Here's what happened to me.
> 
> I have a neatly running database-oriented application in Perl based on a
> script that acts as a developing tool and is being used intensively for 6
> years now on our intranet and internet sites.  The application works fine in
> MSIE6 and Opera7.11, but in Firefox1.0.3, the browser does not show the
> contents in the main screen but starts the download-or-open dialog ('You
> have chosen to open query.pl which is a: PL file, from www2.minlnv.nl. What
> should Firefox do with this file: Open with / Save to disk').  When I choose
> 'Save to disk' the saved file is the exact HTML that should have been opened
> in the browser.  So, all code is executed fine.
> 
> Sounds like an incorrect http header to me.  The script starts with some
> 'use'-commands, then
> print "Content-Type: text/html\n\n";
> then a few subroutines, then the main program.
> 
> When I change my script as follows:
> print "Content-Type: text/html\n\n";
> print 'x';
> exit;
> followed by my original code, same behaviour (including just an 'x' in the
> downloaded file)
> 
> Now for the weird part of it.
> 
> When I change my script as follows:
> print "Content-Type: text/html\n\n";
> print 'x';
> exit;
> *and delete* the rest of the code, the browser shows 'x' instead of the
> dialog.
> 
> Note that this was code that compiles and executes without problems.  It
> makes a difference *after* the exit statement.  The remaining code has no
> END routines so I expect exit does not more than exit.  Changing exit to
> exit(0) or exit(1) makes no difference.
> 
> BTW. When I replace the self-contructed header with
> $cgiobj = new CGI;
> print $cgiobj->header;
> the same behaviour.
> 
> And then, finally, when I try the following script:
> 
> use LWP::Simple;
> print "Content-Type: text/html\n\n";
> $doc = get
> 'http://www2.minlnv.nl/cgi-bin/database/query.pl?config=/thema/groen/ffwet/s
> oorten&snp=zoeken-public';
> print $doc;
> I *do* get my content in the browser window, which indicates that the sent
> HTML is not the cause.

You could try adding this to the front of your code:

BEGIN { use CGI::Carp qw(fatalsToBrowser); }

I would move the
print "Content-Type: text/html\n\n";
to that begin block also to make sure it gets out before anything else.

Try making a smaller hello world script that fails and post it to make
sure it's not a server misconfig problem.  Your current script is too
big to mess with and doesn't have strict or warnings turned on.

> -
> Server OS: Win2000
> Webserver: IIS 5
> Authentication: none required (public)
> Perl version: 518 (yeah I know)
> Affected url: any link to /cgi-bin/database/query.pl under
> http://www2.minlnv.nl/thema/groen/ffwet/soorten/intro.htm
> Program code: available from http://www.agro.nl/tmp/query.zip - you'll get a
> nice impression of my programming style of 6 years ago :-) but I can't
> possibly ask you to take a dive into the code details.


-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: fork() and ithreads in AS Perl 5.8.6

2005-07-13 Thread Angus McIntyre

At 8:24 -0600 13.07.2005, <[EMAIL PROTECTED]> wrote:

You must REAP your children ...


Excellent advice, thank you.

I did what you suggested, and it seems to have resolved the problem completely.

Thanks,

Angus
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Problem With Win32::OLE and InternetExplorer.Application

2005-07-13 Thread StoneBeat
Hi, i am triying to do a POST request with InternetExplorer.Application but 
the object refuses to do it and always does a GET request.

Searching in MSDN i have found :

http://msdn.microsoft.com/workshop/browser/webbrowser/reference/methods/navigate.asp

and my Code is :

use Win32::OLE qw(EVENTS); 
use strict ;

my $IE  = Win32::OLE->new("InternetExplorer.Application");

my $respuesta = "X" x 2000 ;


$IE->Navigate('http://192.168.7.1',0,'_BLANK',$respuesta,undef);
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread Hugh Loebner
I doubt this.
Please provide an example.

HLOn 7/13/05, Michael Erskine <[EMAIL PROTECTED]> wrote:
On Wednesday 13 July 2005 13:30, Hugh Loebner wrote:> Why on earth are you using a goto statement? They are pernicious.On the contrary, a goto is often most appropriate in expressing clear programflow.
Regards,Michael Erskine--Kinkler's First Law: Responsibility always exceeds authority.Kinkler's Second Law: All the easy problems have been solved.___
Perl-Win32-Users mailing listPerl-Win32-Users@listserv.ActiveState.comTo unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: [aswin32] Re: RE: How to find the perl install directory?

2005-07-13 Thread Robert May

Anything wrong with:

#!perl -w
use strict;
use warnings;

use Config;

print $Config{prefix} . "\n";
print $Config{prefixexp} . "\n";  # fully expanded version of above (probably
 # the same in Win32)

exit(0);
__END__

Regards,
Rob.



[EMAIL PROTECTED] wrote:

Here's a more annoying way than Peter's in the event that you dont add 
perl to your path (heaven knows why one of my client opted for that!)


$version = $Registry->
{'LMachine/SOFTWARE/ActiveState/ActivePerl//CurrentVersion'};
$gbl_PerlPath = $Registry->
{'LMachine/SOFTWARE/ActiveState/ActivePerl/' . $version . '//'};

Wee!
 





Here's one way:
 
###
 
for $dir (split(/;/,$ENV{'PATH'}))

{
 
 opendir(DIR, "$dir") || die "Can't open $dir for reading : $!\n";
 
 while ($_ = readdir(DIR))

 {
print "$dir\n" if ($_ eq 'perl.exe');
 }
 
 close(DIR);
 
}
 


-Original Message-
*From:* Apurva Shukla [mailto:[EMAIL PROTECTED]
*Sent:* Friday, July 08, 2005 9:56 AM
*To:* perl-win32-users@listserv.ActiveState.com
*Subject:* How to find the perl install directory?

Hi All,

I have perl installed on my system at C:\Perl.

now I need to write a script which if I run on any computer gives
me  the directory where perl is installed.

For e.g. on my system it should be
$perl whereisperl.pl
c:\Perl

{Factually what I really want to do is:
$whereisperl.bat
c:\Perl
}

I have tried seeing enviroment variables but none of the
environment variables store any informatio except the PATH which
stores a link to it and that too is filled with a huge number of
paths. One option could be to parse that and get the path to Perl
install directory but I feel there has to be a neater way. Also
another problem I have is that I want to write a bat file so
parsing is a little problem i want to avoid.

TIA
-- 
Apurva Shukla


-
dream & dare
-

 



This message was scanned by ATX
10:49:26 AM ET - 7/8/2005



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 




___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread Peter Eisengrein
> 
> 
> if ($choice !~ /^sub[12]$/)
> {
>   &badchoice;
> }
> else
> {
>   &{$hash{$choice}};
> }
> 

Actually this if statement should've been

if ($hash{$choice})
{
&{$hash{$choice}};
}
else
{
&badchoice;
}

Much more gooder than the regex.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread Lou Losee
There is also discussion about implementing SWITCH equivilents in the
perldoc for perlsyn under the heading 'Basic BLOCKs and Switch
Statements'.

Lou

On 7/13/05, Thomas, Mark - BLS CTR <[EMAIL PROTECTED]> wrote:
> John Deighan wrote:
> 
> > We have a goto in our code. I hate it, but there just isn't a good
> "switch" or "case" statement in Perl yet
> 
> Yes there is, in Perl 5.8. If you're using an older Perl, you can still get
> Switch.pm from CPAN.
> 
> use Switch;
> 
> switch ($val) {
> case 1  { print "number 1" }
> case "a"{ print "string a" }
> case [1..10,42] { print "number in list" }
> case (@array)   { print "number in list" }
> case /\w+/  { print "pattern" }
> case qr/\w+/{ print "pattern" }
> case (%hash){ print "entry in hash" }
> case (\%hash)   { print "entry in hash" }
> case (\&sub){ print "arg to subroutine" }
> else{ print "previous case not true" }
> }
> 
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread Gardner, Sam
Title: RE: Change in "goto" behavior





This kind of flexibility in a switch statement reminds me why I love perl.


Sam Gardner


GTO Application Development


Keefe, Bruyette & Woods, Inc.


212-887-6753






-Original Message-
From: Thomas, Mark - BLS CTR [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 13, 2005 10:46 AM
To: 'John Deighan'; perl-win32-users@listserv.ActiveState.com
Subject: RE: Change in "goto" behavior



John Deighan wrote:


> We have a goto in our code. I hate it, but there just isn't a good
"switch" or "case" statement in Perl yet


Yes there is, in Perl 5.8. If you're using an older Perl, you can still get Switch.pm from CPAN.


    use Switch;


    switch ($val) {
    case 1  { print "number 1" }
    case "a"    { print "string a" }
    case [1..10,42] { print "number in list" }
    case (@array)   { print "number in list" }
    case /\w+/  { print "pattern" }
    case qr/\w+/    { print "pattern" }
    case (%hash)    { print "entry in hash" }
    case (\%hash)   { print "entry in hash" }
    case (\&sub)    { print "arg to subroutine" }
    else    { print "previous case not true" }
    }


___
Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread John Deighan

At 10:46 AM 7/13/2005, Thomas, Mark - BLS CTR wrote:

John Deighan wrote:

> We have a goto in our code. I hate it, but there just isn't a good
"switch" or "case" statement in Perl yet

Yes there is, in Perl 5.8. If you're using an older Perl, you can still get
Switch.pm from CPAN.


Great to know, but... What I see below looks semantically great - regular 
expressions and all that. However, that tells me that each case needs to be 
tried to find the matching case, which can be computationally very 
expensive, especially if there are hundreds of cases. What we need is a 
single (usually hash algorithm) lookup that determines very quickly the 
case that applies. That's what a "case" statement in Pascal (and, I think, 
a "switch" in C) does. That is also what a "goto $op" does in Perl, where 
$op must be the name of an existing label.


One possibility is that Perl might check if every case value is a scalar, 
and generate the more efficient hash lookup method in that case. That would 
be great since it would basically optimize to the best method depending on 
the complexity of the case values, but I don't know if it does that. But, 
in our case, we definitely need the switch to be as efficient as possible.



use Switch;

switch ($val) {
case 1  { print "number 1" }
case "a"{ print "string a" }
case [1..10,42] { print "number in list" }
case (@array)   { print "number in list" }
case /\w+/  { print "pattern" }
case qr/\w+/{ print "pattern" }
case (%hash){ print "entry in hash" }
case (\%hash)   { print "entry in hash" }
case (\&sub){ print "arg to subroutine" }
else{ print "previous case not true" }
}



Scanned for Spam and Viruses.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread Johan Lindstrom

At 15:55 2005-07-13, John Deighan wrote:
but that's another matter. (We initially used a "goto FINISH", but I hated 
that, too. You can use a "break" if you're in a loop.) We use a method 
that I really don't have time to describe now, but doesn't use a "goto". I 
hate goto's, but for the example above, it's efficient and much clearer 
than e.g. setting up a hash of op names and code to handle each op.


I think you just demonstrated why the dispatch table really is the way to 
go :)


For instance, did you remember to wrap the goto in an eval to catch missing 
labels?


It's not that goto is inherently bad, but it has a so very, very, very 
specific niche in modern languages with other program flow constructs. The 
only useful example I can think of is in C where you can use it to simplify 
resource allocation/deallocation. But in Perl... no.


Unless, of course, you're talking about goto LINE:
http://search.cpan.org/~abergman/Acme-Goto-Line-0.01/Line.pm

;)


/J

 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com

Latest bookmark: "TCP Connection Passing"
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread Peter Eisengrein

>> At 08:30 AM 7/13/2005, Hugh Loebner wrote:
>> 
>> Why on earth are you using a goto statement?  They are pernicious.
>
> We have a goto in our code. I hate it, but there just isn't a good 
> "switch" or "case" statement in Perl yet (I think I've heard that it's 
> planned)


It's not a case/switch, but you can do the same kind of thing with a hash:


my %hash = (
sub1 => 'dothis', 
sub2 => 'dothat',
);


print "Choose a sub: sub1, sub2: ";
chomp(my $choice=);


if ($choice !~ /^sub[12]$/)
{
&badchoice;
}
else
{
&{$hash{$choice}};
}


sub dothis
{
print "You selected to dothis!\n";
}

sub dothat
{
print "You selected to dothat!\n";
}

sub badchoice
{
print "You don't follow directions very well.\n";
}

  
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread Gardner, Sam
Title: Message



John,
 
    Look up function dispatch tables on perlmonks.com.  
It's a pretty good alternative to switch case statements (better than if-else, 
anyway).  
 
    But as to your question, I don't know if there was any 
functionality change made.
 
Sam
 
 


  
  

  Sam 
  Gardner
  

  GTO Application Development
  

  Keefe, Bruyette & Woods, Inc.
  

  212-887-6753

  
  -Original Message-From: John Deighan 
  [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 9:55 
  AMTo: perl-win32-users@listserv.ActiveState.comSubject: 
  Re: Change in "goto" behaviorAt 08:30 AM 7/13/2005, Hugh 
  Loebner wrote:
  Why on earth are you using a goto 
statement?  They are pernicious.We have a goto in our 
  code. I hate it, but there just isn't a good "switch" or "case" statement in 
  Perl yet (I think I've heard that it's planned), and the following just isn't 
  efficient enough for us:if ($op = 'thisop') 
  {}elsif 
  ($op = 'thatop') 
  {}...There 
  are hundreds of possible values for $op. Anyway, I don't know how many people 
  are aware of it, but the destination of a "goto" can be a variable, 
  e.g.goto 
  $op;thisop: 
  do_this();thatop: 
  do_that();Of course, you then have to prevent the fall through from 
  the code for thisop: to the code for thatop:, but that's another matter. (We 
  initially used a "goto FINISH", but I hated that, too. You can use a "break" 
  if you're in a loop.) We use a method that I really don't have time to 
  describe now, but doesn't use a "goto". I hate goto's, but for the example 
  above, it's efficient and much clearer than e.g. setting up a hash of op names 
  and code to handle each op.
  On 7/12/05, Dave Ressler 
<[EMAIL PROTECTED]> wrote:

  I have noticed a change in behavior in "goto" statements 
  recently. Whereas a statement like "goto PLACE;" would work fine no matter 
  where "PLACE:" was in my code, I've noticed that scripts that used to work 
  are now failing at the "goto" statement.
   
  I can probably work out an example if needed, but the 
  general question is: have any restrictions been put on "goto" recently? 
  What are the real criteria needed to be satisfied for the destination to 
  be successfully found?
   
  Thanks,
  Dave
  ___
  Perl-Win32-Users mailing list
  Perl-Win32-Users@listserv.ActiveState.com 
  
  To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Scanned for Spam and Viruses. Content-Type: text/plain; 
charset="us-ascii"MIME-Version: 1.0Content-Transfer-Encoding: 
7bitContent-Disposition: inlineX-NAIMIME-Disclaimer: 
1X-NAIMIME-Modified: 
1___Perl-Win32-Users 
mailing listPerl-Win32-Users@listserv.ActiveState.comTo unsubscribe: 
http://listserv.ActiveState.com/mailman/mysubsScanned 
for Spam and Viruses.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread Anderson, Mark (Service Delivery)
>(We initially used a "goto FINISH", but I hated that, too. You can
use a "break" if you're in a loop.) 

you can also just surround the code in {} to make it a block and then use
"last;" 

in perldoc -f last
Note that a block by itself is semantically identical to a loop
that executes once. Thus "last" can be used to effect an early
exit out of such a block.

What version of perl/platform are you using? 

Kind regards,

Mark Anderson
Team Leader - RSWI
1st Floor, The Broadstone
50 South Gyle Crescent
Edinburgh, EH12 9UX
Tel: 0131 523 7630
Mob: 07808 826 063


> -Original Message-
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, July 13, 2005 2:55 PM
> To:   perl-win32-users@listserv.ActiveState.com
> Subject:  Re: Change in "goto" behavior
> 
> *** WARNING : This message originates from the Internet ***
> 
> At 08:30 AM 7/13/2005, Hugh Loebner wrote:
> 
> 
>   Why on earth are you using a goto statement?  They are pernicious.
> 
> 
> We have a goto in our code. I hate it, but there just isn't a good
> "switch" or "case" statement in Perl yet (I think I've heard that it's
> planned), and the following just isn't efficient enough for us:
> 
> if ($op = 'thisop') {
> }
> elsif ($op = 'thatop') {
> }
> ...
> 
> There are hundreds of possible values for $op. Anyway, I don't know how
> many people are aware of it, but the destination of a "goto" can be a
> variable, e.g.
> 
> goto $op;
> 
> thisop:
>  do_this();
> thatop:
>  do_that();
> 
> Of course, you then have to prevent the fall through from the code for
> thisop: to the code for thatop:, but that's another matter. (We initially
> used a "goto FINISH", but I hated that, too. You can use a "break" if
> you're in a loop.) We use a method that I really don't have time to
> describe now, but doesn't use a "goto". I hate goto's, but for the example
> above, it's efficient and much clearer than e.g. setting up a hash of op
> names and code to handle each op.
> 
> 
> 
>   On 7/12/05, Dave Ressler <[EMAIL PROTECTED]
> > wrote:
>   
> 
>   I have noticed a change in behavior in "goto" statements
> recently. Whereas a statement like "goto PLACE;" would work fine no matter
> where "PLACE:" was in my code, I've noticed that scripts that used to work
> are now failing at the "goto" statement.
>   
>
>   
>   I can probably work out an example if needed, but the
> general question is: have any restrictions been put on "goto" recently?
> What are the real criteria needed to be satisfied for the destination to
> be successfully found?
>   
>
>   
>   Thanks,
>   
>   Dave
>   
>   
>   ___
>   
>   Perl-Win32-Users mailing list
>   
>   Perl-Win32-Users@listserv.ActiveState.com
> 
>   
>   To unsubscribe:
> 
>   
>   
>   
> 
> 
>   _  
> 
>   Scanned for Spam and Viruses. 
>   Content-Type: text/plain; charset="us-ascii"
>   MIME-Version: 1.0
>   Content-Transfer-Encoding: 7bit
>   Content-Disposition: inline
>   X-NAIMIME-Disclaimer: 1
>   X-NAIMIME-Modified: 1
>   
>   ___
>   Perl-Win32-Users mailing list
>   Perl-Win32-Users@listserv.ActiveState.com
>   To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
>   
>   
>   Scanned for Spam and Viruses.
>  << File: ATT1514841.txt >> 


The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered 
Office: 36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the Financial 
Services Authority and represents The Royal Bank of Scotland Marketing Group. 
The Bank sells life policies, collective investment schemes and pension 
products and advises only on the Marketing Group's range of these products and 
on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The Royal Bank of 
Scotland plc does not accept responsibility for changes made to this message 
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, 
it is the responsibility of the recipient to ensure that the onward 
transmission, opening or use o

RE: Change in "goto" behavior

2005-07-13 Thread Joe Discenza




John Deighan wrote, on Wed 7/13/2005 09:55
: We have a goto in our code. I hate it, but there 
just isn't a good "switch" or "case" statement in Perl yet (I think I've heard 

: that it's planned), and the following just isn't 
efficient enough for us:: if ($op = 'thisop') {: 
}: elsif ($op = 'thatop') 
{: }: There are hundreds 
of possible values for $op. Anyway, I don't know how many people are aware of 
it, but the 
: destination of a "goto" can be a variable, 
e.g.:: goto $op;:: thisop:: 
 do_this();: thatop:: 
 
do_that();
Might I suggest a 
hash of sub refs? Then you can just do
 
&{$my_subs{$op}};
 
or something like 
that.
 
Good 
luck,
 
Joe
 

==  
Joseph P. Discenza, Sr. 
Programmer/Analyst   
mailto:[EMAIL PROTECTED]   
Carleton Inc.   http://www.carletoninc.com  
574.243.6040 ext. 300    fax: 574.243.6060 Providing 
Financial Solutions and Compliance for over 30 Years
 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread Michael Erskine
On Wednesday 13 July 2005 13:30, Hugh Loebner wrote:
> Why on earth are you using a goto statement? They are pernicious.

On the contrary, a goto is often most appropriate in expressing clear program 
flow.

Regards,
Michael Erskine

-- 
Kinkler's First Law:
 Responsibility always exceeds authority.

Kinkler's Second Law:
 All the easy problems have been solved.
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: RE: How to find the perl install directory?

2005-07-13 Thread rgrakow1
Here's a more annoying way than Peter's in the event that you dont add 
perl to your path (heaven knows why one of my client opted for that!)

$version = $Registry->
{'LMachine/SOFTWARE/ActiveState/ActivePerl//CurrentVersion'};
$gbl_PerlPath = $Registry->
{'LMachine/SOFTWARE/ActiveState/ActivePerl/' . $version . '//'};

Wee!



Here's one way:
 
###
 
for $dir (split(/;/,$ENV{'PATH'})){ 
 opendir(DIR, "$dir") || die "Can't open $dir for reading : 
$!\n";
 
 while ($_ = 
readdir(DIR)) {print "$dir\n" if 
($_ eq 
'perl.exe'); }
 
 close(DIR); }
 

  -Original Message-From: Apurva Shukla 
  [mailto:[EMAIL PROTECTED]Sent: Friday, July 08, 2005 9:56 
  AMTo: perl-win32-users@listserv.ActiveState.comSubject: 
  How to find the perl install directory?Hi All,I 
  have perl installed on my system at C:\Perl.now I need to write a 
  script which if I run on any computer gives me  the directory where perl 
  is installed. For e.g. on my system it should be$perl 
  whereisperl.plc:\Perl{Factually what I really want to do 
  is:$whereisperl.batc:\Perl}I have tried seeing enviroment 
  variables but none of the environment variables store any informatio except 
  the PATH which stores a link to it and that too is filled with a huge number 
  of paths. One option could be to parse that and get the path to Perl install 
  directory but I feel there has to be a neater way. Also another problem I have 
  is that I want to write a bat file so parsing is a little problem i want to 
  avoid.TIA-- Apurva Shukla 
  -dream & dare- 
  
   
  
  
  
  This message was scanned by 
  ATX10:49:26 AM ET - 
  7/8/2005
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Change in "goto" behavior

2005-07-13 Thread Thomas, Mark - BLS CTR
John Deighan wrote:

> We have a goto in our code. I hate it, but there just isn't a good
"switch" or "case" statement in Perl yet

Yes there is, in Perl 5.8. If you're using an older Perl, you can still get
Switch.pm from CPAN.

use Switch;

switch ($val) {
case 1  { print "number 1" }
case "a"{ print "string a" }
case [1..10,42] { print "number in list" }
case (@array)   { print "number in list" }
case /\w+/  { print "pattern" }
case qr/\w+/{ print "pattern" }
case (%hash){ print "entry in hash" }
case (\%hash)   { print "entry in hash" }
case (\&sub){ print "arg to subroutine" }
else{ print "previous case not true" }
}

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: fork() and ithreads in AS Perl 5.8.6

2005-07-13 Thread Alex.Ignacz

Excerpt <
My first attempt used fork() to launch the sub-processes, and
each 
sub-process would then call exit(0) when complete. However, it 
appears that exit(0) doesn't release the thread handles: the
manager 
would fork 64 sub-processes successfully, and then die with
'resource 
temporarily unavailable' on the 65th. Note that this wasn't a
case of 
too many concurrent processes: most of the sub-processes would 
already have exited, so there were never more than about 20
processes 
active simultaneously.
>

You must REAP your children.

Windows does not support SIG{CHLD} processing, so fake it out by calling
a reaping routine everytime you've completed a connection.

At the top of your code, put this in

use POSIX 'WNOHANG';

Stick this into a convenient routine.

sub ReapChildren {

# this will try to reap all defunct children. 
FORK:
{
my $child = waitpid(-1,WNOHANG);
  return if $child <= 0;
redo FORK;
}
}

And call it at convenient locations, let's say before you're about to
fork out a new process. ( note you can't do it in the child process )

Or, if you have a trap to look for the "resource temporarily
unavailable" message, call it then.

Hope this helps.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Weird behaviour with Mozilla Firefox

2005-07-13 Thread Kamphuys, ing. K.G. (Koen)
Hi all,

I have a weird problem using a script in a CGI environment together with
Mozilla Firefox (1.0.3) that, to me, makes no sense at all, but I hope it
does to you. 

Here's what happened to me.

I have a neatly running database-oriented application in Perl based on a
script that acts as a developing tool and is being used intensively for 6
years now on our intranet and internet sites.  The application works fine in
MSIE6 and Opera7.11, but in Firefox1.0.3, the browser does not show the
contents in the main screen but starts the download-or-open dialog ('You
have chosen to open query.pl which is a: PL file, from www2.minlnv.nl. What
should Firefox do with this file: Open with / Save to disk').  When I choose
'Save to disk' the saved file is the exact HTML that should have been opened
in the browser.  So, all code is executed fine.

Sounds like an incorrect http header to me.  The script starts with some
'use'-commands, then
print "Content-Type: text/html\n\n";
then a few subroutines, then the main program.

When I change my script as follows:
print "Content-Type: text/html\n\n";
print 'x';
exit;
followed by my original code, same behaviour (including just an 'x' in the
downloaded file)

Now for the weird part of it.

When I change my script as follows:
print "Content-Type: text/html\n\n";
print 'x';
exit;
*and delete* the rest of the code, the browser shows 'x' instead of the
dialog.

Note that this was code that compiles and executes without problems.  It
makes a difference *after* the exit statement.  The remaining code has no
END routines so I expect exit does not more than exit.  Changing exit to
exit(0) or exit(1) makes no difference.

BTW. When I replace the self-contructed header with
$cgiobj = new CGI;
print $cgiobj->header;
the same behaviour.

And then, finally, when I try the following script:

use LWP::Simple;
print "Content-Type: text/html\n\n";
$doc = get
'http://www2.minlnv.nl/cgi-bin/database/query.pl?config=/thema/groen/ffwet/s
oorten&snp=zoeken-public';
print $doc;
I *do* get my content in the browser window, which indicates that the sent
HTML is not the cause.

Who can help?
Thanks in advance,

Koen Kamphuys
Ministry of Agriculture, Nature and Food Quality, the Netherlands

-
Server OS: Win2000
Webserver: IIS 5
Authentication: none required (public)
Perl version: 518 (yeah I know)
Affected url: any link to /cgi-bin/database/query.pl under
http://www2.minlnv.nl/thema/groen/ffwet/soorten/intro.htm
Program code: available from http://www.agro.nl/tmp/query.zip - you'll get a
nice impression of my programming style of 6 years ago :-) but I can't
possibly ask you to take a dive into the code details.


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread John Deighan


At 08:30 AM 7/13/2005, Hugh Loebner wrote:
Why on earth are you using a
goto statement?  They are pernicious.
We have a goto in our code. I hate it, but there just isn't a good
"switch" or "case" statement in Perl yet (I think
I've heard that it's planned), and the following just isn't efficient
enough for us:
if ($op = 'thisop') {
}
elsif ($op = 'thatop') {
}
...
There are hundreds of possible values for $op. Anyway, I don't know how
many people are aware of it, but the destination of a "goto"
can be a variable, e.g.
goto $op;
thisop:

do_this();
thatop:

do_that();
Of course, you then have to prevent the fall through from the code for
thisop: to the code for thatop:, but that's another matter. (We initially
used a "goto FINISH", but I hated that, too. You can use a
"break" if you're in a loop.) We use a method that I really
don't have time to describe now, but doesn't use a "goto". I
hate goto's, but for the example above, it's efficient and much clearer
than e.g. setting up a hash of op names and code to handle each
op.
On 7/12/05, Dave Ressler
<[EMAIL PROTECTED]>
wrote:


I have noticed a change in behavior in "goto"
statements recently. Whereas a statement like "goto PLACE;"
would work fine no matter where "PLACE:" was in my code, I've
noticed that scripts that used to work are now failing at the
"goto" statement.

 

I can probably work out an example if needed, but the
general question is: have any restrictions been put on "goto"
recently? What are the real criteria needed to be satisfied for the
destination to be successfully found?

 

Thanks,

Dave


___

Perl-Win32-Users mailing list


Perl-Win32-Users@listserv.ActiveState.com 

To unsubscribe:

http://listserv.ActiveState.com/mailman/mysubs




Scanned for Spam and Viruses. 
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
X-NAIMIME-Disclaimer: 1
X-NAIMIME-Modified: 1
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe:

http://listserv.ActiveState.com/mailman/mysubs

Scanned for Spam and Viruses.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: fork() and ithreads in AS Perl 5.8.6

2005-07-13 Thread Angus McIntyre

At 13:13 +0100 13.07.2005, Paul Sobey wrote:

 Has anyone had any experience in writing multi-threaded processes on
 Windows using libwww-perl? ...


One method that works well for me is to start a fixed number of worker
threads when you script starts, then feed jobs to them from your main
thread. This speeds things up because you don't get the overhead of
cloning the interpreter over and over  ...


Yes, I was considering something like this. This would certainly be 
the elegant way to do it, but at the moment I'm leaning towards the 
quick'n'dirty solution of simply firing off Win32 processes, which 
won't involve me in back-and-forth cross-thread communications (my 
workers will need to be able to tell the boss when they're still busy 
and can't take on new tasks) and won't risk causing the inexplicable 
crashes I've seen with threads. Speed is not really an issue, because 
my tasks involve downloading multi-megabyte files from remote servers 
on slow connections: any time saved by using threads would be lost in 
the overall time taken to download. Memory and CPU impact from 
running multiple interpreters is more of an issue, but I think the 
target boxes I'm deploying on can handle the load.


Once again, the need to have it done by yesterday trumps elegant 
design, but if I ever get time to rewrite this, I might do it the way 
you suggest.


Thanks to everyone else who also wrote with suggestions.

Angus
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Change in "goto" behavior

2005-07-13 Thread Hugh Loebner
Why on earth are you using a goto statement?  They are pernicious.

HLOn 7/12/05, Dave Ressler <[EMAIL PROTECTED]> wrote:







I have noticed a change in behavior in "goto" 
statements recently. Whereas a statement like "goto PLACE;" would work fine no 
matter where "PLACE:" was in my code, I've noticed that scripts that used 
to work are now failing at the "goto" statement.
 
I can probably work out an example if needed, but 
the general question is: have any restrictions been put on "goto" recently? What 
are the real criteria needed to be satisfied for the destination to be 
successfully found?
 
Thanks,
Dave

___Perl-Win32-Users mailing listPerl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: fork() and ithreads in AS Perl 5.8.6

2005-07-13 Thread Paul Sobey
> I'm writing a Perl program to run on Windows platforms (Win2K and 
> WinXP). whose job is to manage concurrent downloads using libwww-perl 
> (LWP). The basic model is that a manager process checks continuously 
> against a task list (actually a directory containing task files) and 
> launches a sub-process or thread to handle each download. Because the 
> downloads are expected to run concurrently, the manager doesn't wait 
> for the sub-processes to complete.



> Has anyone had any experience in writing multi-threaded processes on 
> Windows using libwww-perl? Is it possible to do this stably, or is 
> multi-threading in Windows Perl not yet mature enough? Or, 
> alternatively, am I making some fundamental error in the way I'm 
> going about this?

Hi Angus,

One method that works well for me is to start a fixed number of worker
threads when you script starts, then feed jobs to them from your main
thread. This speeds things up because you don't get the overhead of
cloning the interpreter over and over during your script runtime. Not
sure if this model would work for you - you could fire 10 threads in
your first few lines of code then feed download tasks to them via a
Thread::Queue or somesuch.

Paul

*
Gloucester Research Limited believes the information 
provided herein is reliable. While every care has been 
taken to ensure accuracy, the information is furnished 
to the recipients with no warranty as to the completeness 
and accuracy of its contents and on condition that any 
errors or omissions shall not be made the basis for any 
claim, demand or cause for action.
*


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs