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
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
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.
---
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
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
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.
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
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
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
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
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
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
>
>
> 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.
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
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
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
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
>> 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
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
>(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
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
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
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/
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
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
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
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
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.
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
> 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
30 matches
Mail list logo