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 th

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

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.

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

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 Ers

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.

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 Co

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 appli

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-W

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

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

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: He

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.

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 is

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]] S

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

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

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/swi

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

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 th

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

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

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/

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

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

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 deve

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

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.

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

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