(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
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
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
.
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
...
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
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
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
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
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
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
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
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]
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
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
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
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
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
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';
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
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
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]
21 matches
Mail list logo