Trying to write the processes input of an hatml form via a cgi script I
get this error message:
Software error:
Insecure $ENV{PATH} while running with -T switch at
/usr/local/apache2/cgi-bin/post.cgi line 357.
It concerns the following lines of my cgi script
...
$ENV{PATH} =
From 'perldoc -q taint'
Found in /usr/lib/perl5/5.8.8/pod/perlfaq7.pod
How can I tell if a variable is tainted?
You can use the tainted() function of the Scalar::Util module,
available from CPAN (or included with
Perl since release 5.8.0). See also Laundering and
Thanks for your help. I solved the problem of the error message Insecure
$ENV{...}
Now, another question, In my html form after the insertion of data a cgi
perl save them in a file and open a new html page, from which I want to
have the possibility to go back to the form html page, but
While I try to get file from a site by CURL tool, it
alters me this:
Curl: (6) Could not resolve host:
http://helloworld.com/; No data record of requested type
I am in an inner network, and I try to get file
through gateway (10.89.54.254) by http.
Did anybody get it; can you share it
Hi all, this class that I have written lists the contents of a log table
when the $log-view method is invoked. There is some hardcoded SQL in this
method and all I do is pass it a number which then looks up the relevant
records. This really isn't a reusable class as far as I understand it
On 6/8/06, Graeme McLaren [EMAIL PROTECTED] wrote:
Hi all, this class that I have written lists the contents of a log table
when the $log-view method is invoked. There is some hardcoded SQL in this
method and all I do is pass it a number which then looks up the relevant
records. This really
Hi Anthony, good idea about overriding the table names. I had a feeling
there would be a conf file somewhere. As I am outputting the results of the
SELECT to an HTML::Template I am already using a Conf file which is another
class. This leads me on to another question. If I instantiate my
On 6/8/06, Graeme McLaren [EMAIL PROTECTED] wrote:
Hi Anthony, good idea about overriding the table names. I had a feeling
there would be a conf file somewhere. As I am outputting the results of the
SELECT to an HTML::Template I am already using a Conf file which is another
class. This leads
my ($option) = $_ =~ s/(.*?)#/; #skip inline comments
should be
m//, not s//
On 6/8/06, Anthony Ettinger [EMAIL PROTECTED] wrote:
On 6/8/06, Graeme McLaren [EMAIL PROTECTED] wrote:
Hi Anthony, good idea about overriding the table names. I had a feeling
there would be a conf file
Hi all, I've just been reading a bit about accessor get/set methods. I have
a method:
sub even{
my $self = shift;
my $even = shift;
$self-{_even} = $even if defined($even);
return $self-{_even};
}
This basically does what a get and set method would do. So why would I need
a
Joshua Colson wrote:
On Thu, 2006-06-08 at 00:55 +0200, Flemming Greve Skovengaard wrote:
If you are just going to print the day number and you have other dates in a
similar format why not just use:
print +(split /\s+/, $date)[2];
Well, in this particular instance, I am. However, there have
* Graeme McLaren [EMAIL PROTECTED] [2006-06-08T05:44:05]
Hi all, I've just been reading a bit about accessor get/set methods. I
have a method:
sub even{
my $self = shift;
my $even = shift;
$self-{_even} = $even if defined($even);
return $self-{_even};
}
This
Hello, I was running an earlier version of perl and upgraded to the
latest one. Now when I run perl from command line, I get an error like
this
[Thu Jun 8 18:57:18 2006] Importer_mysql.pl: install_driver(mysql)
failed: Can't load
Hi,
I'm trying to write a perl script that will run on one server but can
instruct either socker server deamon on another server to exec any one
of three applications on a different box. The reason for this is the
password changes every month and the scripts that I'm currently using
fails
-Original Message-
From: William Paulsen (W) [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 8:54 AM
To: beginners@perl.org
Subject: Exec a script on one server that will exec other scripts on a
different server..
Hi,
I'm trying to write a perl script that will run on one
Adding it would be an advantage, however right now I just need setup a
client side script that'll tell the server side to exec/run one of
three scripts on the other server.
tks
William
Gugulethu
-Original Message-
From: Jerry DuVal [mailto:[EMAIL PROTECTED]
Sent: 08 June 2006 03:09 PM
hi,
I am totally a beginner at perl. I have to write a perl script as following:
I am given a ldif(ldap interchange format) file which contains all the
information about all employees of my organization. I can use ldapsearch to
extract information about one particular employee. I am also given
Vijay Kumar Adhikari a écrit :
Hello, I was running an earlier version of perl and upgraded to the
latest one. Now when I run perl from command line, I get an error like
this
[Thu Jun 8 18:57:18 2006] Importer_mysql.pl: install_driver(mysql)
failed: Can't load
Thanks, but I am not using mod_perl.
The problem is twofold. It works well when accessed from CGI. It
doesn't complain anything at all. When run in command line, it
generates that error.
My questions are: 1) How do I know which perl executable CGI is
running and 2) How do I fix that error with
Adding it would be an advantage, however right now I just need setup a
client side script that'll tell the server side to exec/run one of
three scripts on the other server.
We have a similar situation. One thing we did on the boxes we could not add
the key pairs was add a cron that ran a script
Vijay Kumar Adhikari a écrit :
Thanks, but I am not using mod_perl.
The problem is twofold. It works well when accessed from CGI. It
doesn't complain anything at all. When run in command line, it
generates that error.
My questions are: 1) How do I know which perl executable CGI is
running and
FC3
On 6/8/06, sfantar [EMAIL PROTECTED] wrote:
Vijay Kumar Adhikari a écrit :
Thanks, but I am not using mod_perl.
The problem is twofold. It works well when accessed from CGI. It
doesn't complain anything at all. When run in command line, it
generates that error.
My questions are: 1)
Hello All,
I'm just trying to get some ideas for the best way to approach this...
I have a CSV file whose first line is a header. According to this header
there should be 17 values per line. Unfortunately this is not the case.
It seems that the first 16 header values match up with the first 16
On 6/8/06, chen li [EMAIL PROTECTED] wrote:
Dear all,
How can I add a line (lines) to the following script
so that I can show the results on a new browser window
after I press the submit button?
Thanks,
Li
#!c:/Perl/bin/perl.exe
use warnings;
use strict;
use CGI;
my $query_obj=CGI-new();
On 6/8/06, Vijay Kumar Adhikari [EMAIL PROTECTED] wrote:
How do I know which perl executable CGI is
running
If your sysadmin won't tell you, upgrade your sysadmin. :-)
But you can use Inside to tell you about your CGI configuration,
including which perl binary runs it:
Hello everybody
As the path to a directory under Linux is like /file/file/file where
file can be a word containing either - or _ .
Which regexp can match this in the best way?
I tried (/\w[-]?\w/)+ but it doesn't work well.
Thanks in advance.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hi,
I have the following code snippet in which I open two
files for read.
For each line in file 1 (log.txt), I extract the test
name, which is of format dir/file which is my
pattern and search for the line with same pattern in
file 2 (rg_table.txt). Somehow it's not working.
open (TST_IN,
From: William Paulsen (W)
Sent: Thu 2006-06-08 14:54
To: beginners@perl.org
Subject: Exec a script on one server that will exec other scripts on a
different server..
Hi,
I'm trying to write a perl script that will run on one server but can
instruct either
sfantar schreef:
As the path to a directory under Linux is like /file/file/file where
file can be a word containing either - or _ .
Which regexp can match this in the best way?
I tried (/\w[-]?\w/)+ but it doesn't work well.
You have two slashes in there, as if you want to match
On Thu, Jun 08, 2006 at 02:54:06PM +0200, William Paulsen (W) wrote:
I'm trying to write a perl script that will run on one server but can
instruct either socker server deamon on another server to exec any one
of three applications on a different box. The reason for this is the
password
sfantar a écrit :
Hello everybody
As the path to a directory under Linux is like /file/file/file where
file can be a word containing either - or _ .
Which regexp can match this in the best way?
I tried (/\w[-]?\w/)+ but it doesn't work well.
Thanks in advance.
Could this be a solution :
On 6/8/06, Ricardo SIGNES [EMAIL PROTECTED] wrote:
* Graeme McLaren [EMAIL PROTECTED] [2006-06-08T05:44:05]
Hi all, I've just been reading a bit about accessor get/set methods. I
have a method:
sub even{
my $self = shift;
my $even = shift;
$self-{_even} = $even if
Hi,
Sorry, it was working, found out the problem was due
to something else.
Thanks,
Anu.
--- anu p [EMAIL PROTECTED] wrote:
Hi,
I have the following code snippet in which I open
two
files for read.
For each line in file 1 (log.txt), I extract the
test
name, which is of format
On Thu, 2006-08-06 at 10:56 -0700, Anthony Ettinger wrote:
i prefer the return once method:
sub foo
{
my $self = shift;
if (@_ == 1) { $self-{'foo'} = shift; }
return $self-{'foo'};
}
I would prefer it to return the old value:
sub foo {
my $self = shift;
my $old_foo =
- Original Message -
From: RICHARD FERNANDEZ [EMAIL PROTECTED]
Newsgroups: perl.beginners
To: beginners@perl.org
Sent: Thursday, June 08, 2006 11:17 AM
Subject: parsing a CSV file with more fields than column names
Hello All,
I'm just trying to get some ideas for the best way to
On 6/8/06, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote:
On Thu, 2006-08-06 at 10:56 -0700, Anthony Ettinger wrote:
i prefer the return once method:
sub foo
{
my $self = shift;
if (@_ == 1) { $self-{'foo'} = shift; }
return $self-{'foo'};
}
I would prefer it to return the old
Is there a way to modify @INC for the perl installation as a whole?
All my scripts have logic to push the same directory to @INC. It's
rather repetative.
I know I can export PERL_LIB environment variable, but I need
something for all system users (including win32).
--
Anthony Ettinger
As long as you're sure that there aren't any commas in your data, you
could always do this:
my @records = split(/,/,$line,17);
This will limit your total records to 17, and will dump the rest into
the 17th record. Then you can split the last record again if you want.
If you have some
Hello ,
Hope this work.
#!c:/Perl/bin/perl.exe
use warnings;
use strict;
use CGI;
my $query_obj=CGI-new();
#creat webpage
print $query_obj-header;
print $query_obj-start_html('My First Webpage');
if (!$query_obj-param){
print
$query_obj-start_form(-target='_new');
Win32 changes to the environment from within your script won't be
permanent, so that won't work unless you do the system call that sets
the environment variable permanently (and also the local one, because it
won't reflect the changes to the system call until it is invoked again).
Do you have
I would prefer it to return the old value:
sub foo {
my $self = shift;
my $old_foo = $self-{'foo'};
$self-{'foo'} = shift if @_ 0;
return $old_foo;
}
If you set a new value, why would you want your client to still be
using the old value?
Because you may need to
Is there a way to modify @INC for the perl installation as a whole?
Yes. Recompile Perl setting the appropriate compile-time flags. More
importantly, though: Why? It is just easier to install your modules
in the standardly defined place for site-specific modules.
All my scripts have logic
Hello Rich
Hi, Chris, thanks for your response
See docs for perlfunc, specifically split.
Especially, the form for split
'split /PATTERN/,EXPR,LIMIT'
By setting the limit, you will be able to solve the problem.
Chris
The thing is I can't be sure that there will never be
-Original Message-
From: RICHARD FERNANDEZ [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 2:04 PM
To: beginners@perl.org
Subject: RE: parsing a CSV file with more fields than column names
Hello Rich
Hi, Chris, thanks for your response
See docs for perlfunc,
On Thu, Jun 08, 2006 at 01:59:46PM -0700, Lawrence Statton wrote:
Is there a way to modify @INC for the perl installation as a whole?
Yes. Recompile Perl setting the appropriate compile-time flags. More
importantly, though: Why? It is just easier to install your modules
in the standardly
You do not need logic to do that. It would seem better to use:
use lib '/path/to/my/misplaced/perl-modules';
The point is to not have to specify a local path at all:
use lib qw(/path);
push(@inc, '/path');
Each script tests for OS: linux/sunos, and win32, and pushes the path
to @INC
On 6/8/06, Chad Perrin [EMAIL PROTECTED] wrote:
Yes. Recompile Perl setting the appropriate compile-time flags. More
importantly, though: Why? It is just easier to install your modules
in the standardly defined place for site-specific modules.
By install do you mean cp myMod.pm to
Are you SURE that there might be commas in the other fields?
I would hope that whoever made this file you're parsing would
have thought of this if they ever intended to later use the data.
Good point. But I have no way of verifying that.
These CSV files are provided to me by an outside
-Original Message-
From: RICHARD FERNANDEZ [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 2:37 PM
To: beginners@perl.org
Subject: RE: parsing a CSV file with more fields than column names
Are you SURE that there might be commas in the other fields?
I would hope that whoever
On 6/8/06, Lawrence Statton [EMAIL PROTECTED] wrote:
I would prefer it to return the old value:
sub foo {
I see...I i've been more or less looking at the current state
$curr = $foo-bar();
$old = $curr;
$curr = $foo-bar('new value');
--
Anthony Ettinger
Signature:
I use a script that generates stats for clamav. It generates both txt and
html output. The problem is that the line length in the txt and html
output differ. For instance in the txt output it shows this: (the numbers
differ because the files were generated at different times)
Here's the offending line:
###
$TXT .= swrite(@ @ @,$rec,
$stats{virus}-{$rec}, $percent).%\n if $text;
###
The @ part is telling format to print up to 21 characters
of $rec and truncate the rest, left justifying it. If you want to make the
printout of $rec longer, add more of
On Thursday 08 June 2006 8:11 pm, Timothy Johnson wrote:
Here's the offending line:
###
$TXT .= swrite(@ @ @,$rec,
$stats{virus}-{$rec}, $percent).%\n if $text; ###
The @ part is telling format to print up to 21
characters of $rec and truncate the rest, left justifying it. If you
53 matches
Mail list logo