can you give me a pice of advice of security aspects creating cgi scripts
working with apache server on linux running 2.2.19 kernel - any backdoors i
should be aware of ?
is there any chance to get a root password via badly writen cgi script - i
used mysql and psql dbd pure perl modules with dbi
Skorpion wrote:
can you give me a pice of advice of security aspects creating cgi
scripts working with apache server on linux running 2.2.19 kernel -
any backdoors i should be aware of ?
See the security resources on the CGI Meta-FAQ:
http://www.perl.org/CGI_MetaFAQ.html
is there any chance
I am writing in Perl, to create a web page.
The CGI calls on itself repeatedly as you move on the map.
I need to preload some small images in memory of the players computer.
Javascript has a way of doing this, but since the cgi calls on itself, if I
put the code in my cgi
the images would only be
Hello,
Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @ INC (@INC
includes
/usr/lib/perl5/5.6.1 etc, etc etc, etc.
Thanks - Susan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Tue, 11 Mar 2003 at 11:49, Susan Aurand opined:
SA:Hello, Can anyone tell me why I am receiving an error can't locate
SA:Net/LDAP.pm in @ INC (@INC includes /usr/lib/perl5/5.6.1 etc, etc etc,
SA:etc.
is net::ldap installed?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Can anyone tell me why I am receiving an error can't
locate Net/LDAP.pm in @ INC (@INC includes
/usr/lib/perl5/5.6.1 etc, etc etc, etc.
Yes, this means that the module you are trying to use is
not installed in any of the directories that are in the INC
list.
The module may not be installed
I am including the same CGI script as an SSI on several web pages. I
need to know which page the script was run from (something like the
javascript window.location variable). I want to be able to know if the
script was executed from index.html, or contact.html, or products.html,
etc. I cannot
If you're using Apache, you can read from the magical environment hash to
see what URL the script was called from.
try this: $ENV{'REQUEST_URI'};
or print them all like so:
print $_ . .$ENV{$_} . BR for(keys(%ENV));
I'm not sure how this behaves with other servers such as IIS, but it's
Hi all,
How to open, initialize, read and write to a serial port in Perl? Any advice helps,
thanks.
David
Wiggins d'Anconia said:
Are you doing:
use warnings;
or using the -w switch? The use warnings pragma should be package or
file scoped (I never can remember)
Actually, it is lexically scoped, which is even better.
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To
David Cheng wrote:
Hi all,
How to open, initialize, read and write to a serial port in Perl? Any advice helps,
thanks.
David
perldoc -q serial port
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 10 Mar 2003 at 13:31, David Cheng wrote:
Hi all,
How to open, initialize, read and write to a serial port in Perl? Any advice helps,
thanks.
David
David,
I have used Win32::SerialPort and
Device::SerialPort (Linux) with excellent
results.
You may want to go to:
i have a couple of questions on File::Find and Image::Info ;
1. why is my if statement not working to detect when i have a directory:
last if ($file eq $dir);
2. why do i get this message when i finally do get to an image:
Not a CODE reference at ./bigimg2.pl line 39.
(this is displayed once
i have just tried Device::SerialPort as we need something at work
to control set of video switchers over rs232.
I can send strings to a test device (a std modem) but I can't get
it to send me data back properly. Sometimes i get the data as i
should, but more often than not I get the command I
I'm looking into writing some OO modules for my sites, and have found a few
examples
but they don't define their own 'clone' functions. So from what you said
previously
'clone' must be defined within one of the following:
use HTTP::Status;
use HTTP::Request;
use LWP::UserAgent;
use URI::URL;
Is
http://search.cpan.org/author/RDF/Clone-0.13/Clone.pm
José.
-Original Message-
From: Tom Norwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 12:28 PM
To: Wiggins d'Anconia
Cc: [EMAIL PROTECTED]
Subject: RE: Inheritance and clone()
I'm looking into writing some OO
On Mon, 10 Mar 2003 13:31:47 -0800, [EMAIL PROTECTED] (David
Cheng) wrote:
Hi all,
How to open, initialize, read and write to a serial port in Perl? Any advice helps,
thanks.
Get the Device-SerialPort module from http://cpan.org
It has plenty of demos.
--
To unsubscribe, e-mail: [EMAIL
Tom Norwood wrote:
I'm looking into writing some OO modules for my sites, and have found
a few
examples
but they don't define their own 'clone' functions. So from what you
said
previously
'clone' must be defined within one of the following:
use HTTP::Status;
use HTTP::Request;
use
Learn Perl wrote:
Hi guys, is there Modules that would read an html file? or handles
html file?
Hi Eric.
Yes, there are many modules to do this, as Perl is one of the
preferred languages for implementing CGI scripts. If you say
more about what you want to do we can help you better.
Rob
--
Shawn Wilson wrote:
i have a couple of questions on File::Find and Image::Info ;
1. why is my if statement not working to detect when i have a
directory: last if ($file eq $dir);
Why do you think it isn't working? Unless your version of Perl
bahaves differently I would expect it to work
Thanks for reponse.
I am very new to perl.
A silly question is where i can find CGI:Session and how to install it?
i have perl, v5.6.1 built for i386-linux.
Thanks
On Mon, 10 Mar 2003, Wiggins d'Anconia wrote:
Xiongfei Wang wrote:
I have code :
i got internel server error
http://search.cpan.org/author/SHERZODR/CGI-Session-3.92/
José.
-Original Message-
From: Xiongfei Wang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:29 PM
To: Wiggins d'Anconia
Cc: [EMAIL PROTECTED]
Subject: Re: CGI:Session
Thanks for reponse.
I am very new to
Rob Dixon wrote:
2. why do i get this message when i finally do get to an image:
Not a CODE reference at ./bigimg2.pl line 39.
(this is displayed once an image is found)
and line 39 states:
$type=$info-(file_ext);# three letter image
type
You are using the
perldoc -q install
José.
-Original Message-
From: Xiongfei Wang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:29 PM
To: Wiggins d'Anconia
Cc: [EMAIL PROTECTED]
Subject: Re: CGI:Session
Thanks for reponse.
I am very new to perl.
A silly question is where i can
I have redhat 7.3, when i tried to install HTML::Template I got following
error msg. what should i do? do i need to type something after cpan
**
[EMAIL PROTECTED] root]# perl -MCPAN -e shell
Thanks very much that's very helpful, straight to the point,
the books I have beat around the bush a bit.
Well that may be a bit harsh they do have a lot to cover.
Anyway very much appreciated, gets me going again ;o)
Tom Norwood.
-Original Message-
From: Rob Dixon [mailto:[EMAIL
Won't this work?
perl -MCPAN -e 'install HTML::Template'
-Michael
Xiongfei Wang [EMAIL PROTECTED] 03/11/03 08:35AM
I have redhat 7.3, when i tried to install HTML::Template I got
following
error msg. what should i do? do i need to type something after cpan
I have this string:
/tdtd width=3 background=img/colore_grigio.gifimg src=img/colore_grigio.gif
width=1
height=1/td/table
I would like to replace the background adding the absolutepath. So I write this code
$tosubstitute = url($4,$baseurl)-abs-as_string;
$tosubstitute =qq($tosubstitute);
$line
Hi,
I would have thought the curley braces are the problem, have you tried the following
line:
$line =~ s/background(\s?)(=?)(\?)(.*?)(\?)\s/background=$tosubstitute/i;
aim.
===
Francesco del Vecchio wrote:
I have this
Hello,
I need help trying to figure out what I'm doing wrong.
I'm working with 2 seperate text files both of which
contain domain names. What I'm attempting to do is
read the first file of domains and run a search based
on the contents of that file against the second file
of domains. Then open
First off it look s like you're opening a file then for every line of it opening
another file.
So if you have two files and file 1 has 100 lines in it you're opening file2 100 times!
That could get messy.
I'd say put file 2 in a hash
Then open file 1 and do:
if(exists $file1{$f} { ...#
else
Hi,
If it's not required to have the domain commented out (meaning it can just not be
there) then you could do this much more easily with a hash.
If your new file can simply have:
rtfm.com
readitagain.com
Then doing something like this would work well:
my %domains = ();
open( OLD,
Jay,
Here's my solution. It doesn't use File::Slurp, as Dan suggested, but it
does what you want it to do. I think that David's point is a good one ...
if you don't need to preserve order, you can just use a hash. This method
will preserve the order of the second file.
Pete
#!/usr/bin/perl
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one line?
Like ::
sub rmgtlt {
return ??? $_[0] =~
Dan,
Maybe you want to do a series of smaller regexes, rather than one large one?
For example:
sub rmgtlt {
$_[0] =~ s/^\|\$//g;
$_[0] =~ s/[\n\r]//$g;
$_[0] =~ s/\s$//g;
return $_[0];
}
Just a thought that might make it more clear where the problem is. Also, what do you
mean by on
Hello,
Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @ INC (@INC
includes
/usr/lib/perl5/5.6.1 etc, etc etc, etc.
Thanks - Susan
P.S - No, I am not a Student.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello,
Howdy!
Can anyone tell me why I am receiving an error can't locate
Net/LDAP.pm in @ INC (@INC includes /usr/lib/perl5/5.6.1
etc, etc etc, etc.
You don't have LDAP perl module installed or you misspelled LDAP in your script.
IE :
use LDAP;
Instead of
use Ldap;
DMuey
Thanks
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one line?
Like ::
sub rmgtlt {
return ??? $_[0] =~ s/^\|\$|\n|\r|\s$//g;
Dan,
Maybe you want to do a series of smaller regexes, rather than
one large one?
No it was a series of smaller ones. I want to do a one liner **
For example:
sub rmgtlt {
$_[0] =~ s/^\|\$//g;
$_[0] =~ s/[\n\r]//$g;
$_[0] =~ s/\s$//g;
return $_[0];
}
Just a
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one
line?
Like ::
sub rmgtlt {
return ??? $_[0] =~
Dan Muey wrote:
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one
line?
Like ::
sub rmgtlt {
return ??? $_[0] =~ s/^\|\$|\n|\r|\s$//g;
Dan,
I can do it in one line. But I'm not convinced it's the right way to
do it; i.e. it seems like it's cheating:
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g ? return $_[0] : return $_[0];
}
There's got to be a better way that doesn't use this if-then-else
approach. I'd vote for keeping
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one
line?
Like ::
sub rmgtlt {
return ??? $_[0] =~
Dan Muey wrote:
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one
line?
Like ::
sub rmgtlt {
return ??? $_[0] =~
Dan,
return ($_[0] =~ s/^\|\$|\n|\r|\s$//g)[0];
?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
-Original Message-
From: Dan Muey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 9:51 AM
To:
The light is beginning to shine a little brighter...
Joseph's cogent explanation of dereferencing is helpful. Thanks.
Yesterday I went out and bought the 3rd edition to the Perl reference book by
ORA (mine was a very old 1st edition). The 3rd edition has a whole lot more
on references than the
Dan,
I can do it in one line. But I'm not convinced it's the
right way to do it; i.e. it seems like it's cheating:
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g ? return $_[0] : return $_[0]; }
There's got to be a better way that doesn't use this
if-then-else approach. I'd
Dan,
return ($_[0] =~ s/^\|\$|\n|\r|\s$//g)[0];
Same thing.
No go, also tried with a $ before the first ( for kicks.
That gave me an error, of course but hey I tried right?
Thanks
Dan
?
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San
On 11/3/03 5:17 pm, Susan Aurand [EMAIL PROTECTED] wrote:
Hello,
Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @
INC (@INC includes
/usr/lib/perl5/5.6.1 etc, etc etc, etc.
How did you install perl-ldap? What is your complete @INC variable, and
where on your box
Dan Muey wrote:
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one line?
Like ::
sub rmgtlt {
return ???
Dan Muey wrote:
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
Is there a way to so the substitution and return the result in one
line?
Like ::
sub rmgtlt
Jay Kidd wrote:
Hello,
Hello,
I need help trying to figure out what I'm doing wrong.
I'm working with 2 seperate text files both of which
contain domain names. What I'm attempting to do is
read the first file of domains and run a search based
on the contents of that file against the
Shawn Wilson wrote:
i have a couple of questions on File::Find and Image::Info ;
1. why is my if statement not working to detect when i have a directory:
last if ($file eq $dir);
This will exit the loop if the value of $file is exactly the same as the value of
$dir. You are probably
While reading
http://search.cpan.org/author/ERYQ/MIME-tools-5.411a/lib/MIME/Decoder.pm
I noticed that the input output to the decode method have to be file handles. Is
there any way I can get around this and feed it a scalar instead?
I've done some searching and so far haven't found
Dan Muey wrote:
sub rmgtlt { join '', split /^|$|\n|\r|\s$/, $_[0] }
Ooohh that works!
Now that prompts a few other questions :
1) It works with and with out a semi colon behind $_[0], why and which one is better?
The semicolon is optional, neither way is better.
2) Is that the same
Mark Anderson wrote:
Is there a way to so the substitution and return the result in one
line?
Like ::
sub rmgtlt {
return ??? $_[0] =~ s/^\|\$|\n|\r|\s$//g;
}
Without more comments or sample data, I'm not really sure what your
function is doing, but here are some things to
Jay Kidd wrote:
Hello,
I need help trying to figure out what I'm doing wrong.
I'm working with 2 seperate text files both of which
contain domain names. What I'm attempting to do is
read the first file of domains and run a search based
on the contents of that file against the second file
use File::Slurp
$file1 = read_file($fileone);
$file2 = read_file($filetwo);
write_file($filenew,$file1\n$file2)
Thanks Dan,
It's that easy!
-Peter
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
use File::Slurp
$file1 = read_file($fileone);
$file2 = read_file($filetwo);
write_file($filenew,$file1\n$file2)
Thanks Dan,
No problem! File::Slurp is one handy bugger!
It's that easy!
-Peter
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
David Olbersen wrote:
Dan,
return ($_[0] =~ s/^\|\$|\n|\r|\s$//g)[0];
?
Sorry David. Unlike m//, s// only ever returns the
number of substitutions, regardless of context,
capturing braces or the /g modifier. You can
get the captured strings in $1 etc., but only from
the last occurrence of
[EMAIL PROTECTED] wrote:
use File::Slurp
$file1 = read_file($fileone);
$file2 = read_file($filetwo);
write_file($filenew,$file1\n$file2)
Thanks Dan,
It's that easy!
-Peter
Even easier. There is no need to ever read file1. File 2 can be written to it in
append mode simply by
Thanks again everyone for the replies. If any one casre here's some benchmark info I
found out about our discussion ::
Intersting what i found. If the sting is simple they're about even.
If the string is complicated( has more matches/substitutions) it takes a and b the
same ( probably due to
Rob Dixon wrote:
you couldn't get a new object by simply writing:
my $object2 = $object;
as what you would have is simply a second handle
to the same object, and all changes to one would
be echoed in the other. You would have to do:
my $object2 = clone ($object);
sub
There is a clone module on CPAN.
Take a look at it. It will do what you need.
-David W.
-Original Message-
From: david [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 4:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Inheritance and clone()
Rob Dixon wrote:
you couldn't get a new
Dan Muey wrote:
I have this subroutine and it does what I need ::
print rmgtlt($var);
sub rmgtlt {
$_[0] =~ s/^\|\$|\n|\r|\s$//g;
return $_[0];
}
try:
#!/usr/bin/perl -w
use strict;
sub rmgtlt{
$_[0] =~ s/^\|\$|\n|\r|\s$//g,$_[0];
}
my $s = abcd;
print scalar
Dan Muey wrote:
Thanks again everyone for the replies. If any one casre here's some
benchmark info I found out about our discussion ::
Intersting what i found. If the sting is simple they're about even.
If the string is complicated( has more matches/substitutions) it takes a
and b the
I have need to process a file from the following eight(8) column,
pipe-delimited format:
pos12 34 567
8
12345a|a1b2c5d6efg|2c3v4|abcd432|69836|zbn8734abc|893hgj747|bvc098n|
-Original Message-
From: Mat Harris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:50 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; David Cheng
Subject: Re: How to Access Serial Port in Perl
i have just tried Device::SerialPort as we need something at work
to
Since you haven't provided any code, I can't either.
Read up on 'split' though, that should help quite a bit.
--
David Olbersen
iGuard Engineer
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
-Original Message-
From: Gorden-Ozgul,
It's just between c and d.
You can see for yourself ::
#!/usr/bin/perl
use Benchmark;
@q = ('a','b','c','d','e');
if($ARGV[0]) { $var = $ARGV[0]; }
else { $var = sdnlkhdfkjdfvkjdfnvjkd\nhi\r ; }
print \n;
foreach $l(@q) {
timethese(10, {
Substitute and return test
And pack too
perldoc -f pack
perldoc -f split
That should solve your purpose
-Original Message-
From: David Olbersen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 5:18 PM
To: Gorden-Ozgul, Patricia E; [EMAIL PROTECTED]
Subject: RE: PipeDelimited Input / Three File Output
Gorden-Ozgul, Patricia E wrote:
Is this doable in perl?
Yes.
If so, how would I code it?
By examining the problem, determining what steps you need to take to solve it,
developing a plain-language algorithm that describes in precise terms what steps must
be taken to get there, and then
I may be wrong, but some browser have problems giving referers properly causing your
visitor not to be able use your CGI.
Rob Dixon [EMAIL PROTECTED] 03/10/03 06:52AM
Colin Johnstone wrote:
Gidday All,
I have found this subroutine in someone else's program I need to
modify it so it will
Hi,
I am trying to install the Win32::Setupsup [1.0.1] module but got the
following error message Error: no suitable installation target found
for package Win32-Setupsup.
The perl version I am using is 5.8.0 build 805. Can someone please tell
me how I can install this module?
Thanks,
Heidi
Yes thats true thats why I set $check_referer to true if there is no
$ENV{'HTTP_REFERER'}
From: Fred Sahakian [EMAIL PROTECTED]
Subject: Re: Check url for form submission
Date: 12/03/2003 11:34:40
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
I may be wrong, but some browser have problems
Heidi Ng wrote:
Hi,
I am trying to install the Win32::Setupsup [1.0.1] module but got the
following error message Error: no suitable installation target found
for package Win32-Setupsup.
The perl version I am using is 5.8.0 build 805. Can someone please tell
me how I can install this
Use the following command to add the url to your perl repository list
and you will find the module. Let me know if you see the same no
target found problem after you find the module.
ppm repository add Jenda http://jenda.krynicky.cz/perl
Heidi
-Original Message-
From: R. Joseph Newton
Heidi Ng wrote:
Use the following command to add the url to your perl repository list
and you will find the module. Let me know if you see the same no
target found problem after you find the module.
ppm repository add Jenda http://jenda.krynicky.cz/perl
Heidi
I see. I get the same error
Are you running Perl v5.6 or v5.8? I was doing a search on the web and
it seems like you will get this target error message when installing
other Perl modules when you have Perl v5.8 (i.e. the module and the Perl
version are not compatible)
Heidi
-Original Message-
From: R. Joseph
Hi,
Can anyone help me, regarding the trapping of system errors like segmentation fault? I
want the program to exit only after i finish completing my error_log file.
Thanks and Regards
Manish U.
On Wed, 12 Mar 2003, Manish Uskaikar wrote:
Hi,
Can anyone help me, regarding the trapping of system errors like segmentation fault?
I want the program to exit only after i finish completing my error_log file.
1) What kind of errors are you looking at?
2) Is this a perl question?
3) Are
Heidi Ng wrote:
Are you running Perl v5.6 or v5.8? I was doing a search on the web and
it seems like you will get this target error message when installing
other Perl modules when you have Perl v5.8 (i.e. the module and the Perl
version are not compatible)
Heidi
Version 5.8.0 build 805,
Hi,
In Perl 5.6.0 I was able to add module documentation (the html files) to
c:\Perl\html\index.html by copying the files to the relevant directory in
c:\Perl\html\. They would then appear in the modules list on the left of the
page. But that doesn't work in 5.8. Is there another way to do this
Hi
My error is as the subject says, i have a script that i am trying in it to
locate where a directory with images are.
the part in the script that the error i think is arising from is
my $dir = '/home/me/images/';
my @jpegs = `ls *.jpg`;
foreach (@jpegs) {
print$_; # dont forget that a
In perl.beginners Mel Awaisi [EMAIL PROTECTED] wrote:
the part in the script that the error i think is arising
from is
my $dir = '/home/me/images/';
my @jpegs = `ls *.jpg`;
foreach (@jpegs) {
print$_; # dont forget that a newline is
# still at the end
85 matches
Mail list logo