RE: Preventing CPU spikes / was switch confusion

2005-04-14 Thread Charles K. Clarkson
(fatalsToBrowser); : use strict; Also need to turn on warnings. use warnings; # or use -w switch on older perl versions : use switch; CPAN has only Switch.pm, not switch.pm. Did you create your own module or is this a typo? : my $action = $q-param( action ); You have not yet defined $q

Re: Preventing CPU spikes / was switch confusion

2005-04-14 Thread Sean Davis
On Apr 14, 2005, at 2:09 PM, Charles K. Clarkson wrote: How about skipping the Switch stuff and using something like this. use CGI qw/:standard Button/; . . . if ( param() ) { if ( param( 'action' ) =~ /Upload/ ) { # call upload sub } elsif ( param( 'action

RE: Preventing CPU spikes / was switch confusion

2005-04-13 Thread David Gilden
Dear Perl Gurus, I have some problems that I think are a result of how my Switch statement is written. This script is invoked via a web browser to upload a file, and do a few other things. However it appears that the user system / network, or my script is stalling. So the user clicks

Re: Insecure dependency in glob ... with -T switch

2005-01-21 Thread Scott R. Godin
. Or you may need to run somethings thru a dumb regex, which will satisfy the taint checking. It's a dirty hack, but you can do sub untaint_me{ my $in = shift; $in =~ /(.*)/; return $1; } which totally obviates the whole reason for using the -T switch to begin with, but anyway... -- Scott R

Re: Insecure dependency in glob while running with -T switch

2005-01-17 Thread Paul Archer
... my @filesToRemove = *; The line above is causing: Insecure dependency in glob while running with -T switch What can I do still have this functionally and satisfy 'tainting' Thanks, Dave tel: 817-741-2327 fax: 972-916-3451 (kora musician / audiophile / webmaster @ www.coraconnection.com / Ft

RE: Insecure dependency in glob ... with -T switch

2005-01-17 Thread David Gilden
Hi, The code below works fine if run like: using PERL version 5.00503 #!/usr/bin/perl -w but with #!/usr/bin/perl -wT I am still getting error: Insecure dependency in glob while running with -T switch Can I turn off 'tainting' for this block { # turn off taint for this block only

SWITCH / CASE statements

2005-01-16 Thread David Gilden
Quick question here for the PERL gurus! What should be the order for these two statements? exit; last switch; i.e is this correct? Thanks!! Dave -- Ft. Worth __CODE__ SWITCH: { if ($action =~ /Update/) { print redirect(./import_clean_csv.php

Insecure dependency in glob while running with -T switch

2005-01-16 Thread David Gilden
Last question here, #!/usr/bin/perl -wT Snip ... my @filesToRemove = *; The line above is causing: Insecure dependency in glob while running with -T switch What can I do still have this functionally and satisfy 'tainting' Thanks, Dave tel: 817-741-2327 fax: 972-916-3451 (kora

RE: Insecure dependency in glob ... with -T switch

2005-01-16 Thread David Gilden
I thought this would do it, but I am at stopping point: #!/usr/bin/perl -wT my @filesToRemove = map {$_ =~ /^(\w[\w.-]*)/} *; Still getting : Insecure dependency in glob while running with -T switch What can I do still have this functionally and satisfy 'tainting' Thanks, Dave tel: 817

Switch

2004-05-13 Thread Werner Otto
Is there some kind of a swtich statement in perl? -- Kind Regards, Werner Otto -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: Switch

2004-05-13 Thread David Dorward
On 13 May 2004, at 10:29, Werner Otto wrote: Is there some kind of a swtich statement in perl? Yes and no. See: perldoc -q switch -- David Dorward http://dorward.me.uk/ http://blog.dorward.me.uk/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

How can I switch to a Window like using the combination ALT+TAB.

2003-01-14 Thread Khalid . Naji
if a window Search Window1 exist then do only a switch to it else then create a new Window. Thanks KN -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: binmode with graphics, @ARGV, -T switch

2002-01-21 Thread Harvey Quamen
Briac: Thanks so much for all the help and advice. It's great to have a list like this, and I certainly appreciate the time you took to answer all my questions. That particular example is A LOT clearer now, and I learned a lot from your email. Thank you! Harv Quamen (P.S. Sorry to take

binmode with graphics, @ARGV, -T switch

2002-01-20 Thread Harvey Quamen
Hello all: I'm just starting to learn CGI (about 3 days into it) and I have a few questions about the following script called image_fetch.cgi (it's example 3-4 in O'Reilly's CGI Programming with Perl by Guelich, Gundavaram Birznieks, pp. 60-61). Sorry there are so many questions, but I'm a

Re: binmode with graphics, @ARGV, -T switch

2002-01-20 Thread Briac Pilpré
on function use. For example, to get the doc about binmode(): $ perldoc -f binmode 4) When I test for syntax errors on the command line, I get the following: Too late for -T option at image_fetch.cgi line 1. I'm using Perl 5.6.0 and Apache 1.3.20 on Mac OS 10.1. Try adding the -T switch on your

E-mail with the -T switch

2001-10-11 Thread Rob
I've been following this list with the digest version for some time now and have started using the -T swith in all of the scripts that I write now. Unfortunately, I don't know how to send e-mail with the -T switch turned on. I would normally do it like this... /usr/bin/perl -wT use strict

RE: E-mail with the -T switch

2001-10-11 Thread Kipp, James
my($name) = John; my($mailprog) = '/usr/sbin/sendmail'; my($recipient) = '[EMAIL PROTECTED]'; open (MAIL, |$mailprog -t); #The script fails here Try this: open (MAIL, |-, $mailprog , -t); #avoids using the shell or you can do at the top of script: $ENV{PATH} = 'bin:/usr/bin'; # restrict

RE: E-mail with the -T switch

2001-10-11 Thread Rob
open (MAIL, |-, $mailprog , -t); gives me the following in the error log... Can't use an undefined value as filehandle reference at /home/rob/cgi-bin/completeOrder.cgi line 9. On Thu, 11 Oct 2001, Kipp, James wrote: my($name) = John; my($mailprog) = '/usr/sbin/sendmail';

Re: E-mail with the -T switch

2001-10-11 Thread RaFaL Pocztarski
Rob wrote: I've been following this list with the digest version for some time now and have started using the -T swith in all of the scripts that I write now. Unfortunately, I don't know how to send e-mail with the -T switch turned on. I would normally do it like this... open (MAIL

RE: E-mail with the -T switch

2001-10-11 Thread Kipp, James
open (MAIL, |-, $mailprog , -t); try changing $mailprog to /usr/sbin/sendmail Can't use an undefined value as filehandle reference at /home/rob/cgi-bin/completeOrder.cgi line 9. did you try : or you can do at the top of script: $ENV{PATH} = 'bin:/usr/bin'; # restrict the path env var

RE: E-mail with the -T switch

2001-10-11 Thread Rob
Thanks, this one worked. $ENV{PATH}='/usr/sbin'; my($mailprog) = 'sendmail'; my($recipient) = '[EMAIL PROTECTED]'; open (MAIL, |$mailprog -t) ; #Do mail stuff delete $ENV{PATH}; :wq -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]