Re: beginning question for cgi

2004-07-04 Thread Gunnar Hjalmarsson
what conclusion did you make from that latter piece of info? ;-) -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Script does not work on IE

2004-07-07 Thread Gunnar Hjalmarsson
Roland Maynard wrote: Andrew Gaffney wrote: roland maynard wrote: I am able to view my CGI script fine in Mozilla on my linux machine, but when I use internet explorer, it displays a blank page. If you view the source code, the code is there that should be displayed. I am using HTML-Template. Any s

Re: Sending attachments in perl

2004-07-08 Thread Gunnar Hjalmarsson
is message: http://www.mail-archive.com/beginners%40perl.org/msg59382.html MIME::Lite can be installed using that 'manual' method. So can Mail::Sender, which is another module for sending mail with attachments. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
x27;running.pdf'; Any ideas? I would try changing those to full paths. It's not advisable to rely on an assumption about the working directory. Optionally you can set the working directory with the chdir() function. / Gunnar -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contac

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
guration of the mail server. You could for instance try to change my $mail_host = 'smtp.dcs.kcl.ac.uk'; to my $mail_host = 'localhost'; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Werner Otto wrote: Gunnar Hjalmarsson wrote: If you don't get any error messages, another theory is that it has something to do with the configuration of the mail server. You could for instance try to change my $mail_host = 'smtp.dcs.kcl.ac.uk'; to my $mail_host = 'loc

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Werner Otto wrote: I've tried to change to localhost , no go... Okay. Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; Change this line: $msg->send; to $msg->send or die "Error sending msg: $!"; -- Gunnar Hjalmarsson Emai

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Werner Otto wrote: Gunnar Hjalmarsson wrote: Add this line at the top of the script: use CGI::Carp 'fatalsToBrowser'; The permissions on running.pdf was not correct. It helps if you know how to debug! Talking about debugging... You should get the habit of including: use stric

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
d end up with saying $main::surname instead of $surname etc. Normally you should declare your variables lexically using my() the first time they appear: my $surname = param("surname"); I recommend that you read this article: http://perl.plover.com/FAQs/Namespaces.html -- Gun

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
s, and submit it, you'll receive a copy of the message. That's for your record, for your convenience. Personally I think that makes sense. That said, spammers and other abusers should certainly be taken into consideration when dealing with mail via the web. -- Gunnar Hjalmarsson Em

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Camilo Gonzalez wrote: Gunnar Hjalmarsson wrote: I think you are exaggerating, Randal. How much convenience are you ready to sacrifice in order to fight possible abusers? If you want to contact me privately, you can click the link below. If you fill the form, including your own email address, and

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
Brad Lhotsky wrote: Gunnar Hjalmarsson wrote: If you want to contact me privately, you can click the link below. If you fill the form, including your own email address, and submit it, you'll receive a copy of the message. That's for your record, for your convenience. Personally I think

Re: Executing a subroutine from a runtime chosen module

2004-07-10 Thread Gunnar Hjalmarsson
d qw(somefunction); somefunction(); } or my $mod = 'Module'; eval "use $mod qw(somefunction)"; unless ($@) { somefunction(); } Please see: perldoc perlmod perldoc -f eval HTH -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl

Re: how to call an application in cgi and let it run in web browser

2004-07-12 Thread Gunnar Hjalmarsson
die "'phrap fasta1' failed: $?"; system("vi test.pl") == 0 or die "'vi test.pl' failed: $?"; Please test the above, and let us know if it helped you figure out the reason why no files are generated when you run the program via CGI. -- Gunnar Hj

Re: Mailing Script

2004-07-12 Thread Gunnar Hjalmarsson
Bill Jones wrote: Gunnar Hjalmarsson wrote: Gunnar Hjalmarsson wrote: If you want to contact me privately, you can click the link below. If you fill the form, including your own email address, and submit it, you'll receive a copy of the message. That's for your record, for your c

Re: Fwd: Re: how to call an application in cgi and let it run in web browser

2004-07-12 Thread Gunnar Hjalmarsson
Xiangli Zhang wrote: Gunnar Hjalmarsson wrote: system(" perl test1.pl"); This is a better way to run another Perl program: eval "require 'test1.pl'" or die "Couldn't require test1.pl: $@"; system("phrap fasta1"); system("vi test

Re: Mailing Script

2004-07-14 Thread Gunnar Hjalmarsson
ion makes sense to me, and CGI::ContactForm was designed accordingly. So far, nobody who is using (or thinking of using) the module has objected to the fact that it sends a copy of the message to the sender. Of course, it would be possible to make the sending of a copy optional. Maybe something to consider

Re: perl cgi uploaded file is empty

2004-07-17 Thread Gunnar Hjalmarsson
Xiangli Zhang wrote: I use perl cgi to upload file(any type: text or image) from web browser. The file was created, but is empty. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4 -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL

Re: tempfile permissions

2004-07-24 Thread Gunnar Hjalmarsson
at's the file's permissions? (644 required, I suppose.) Btw, exactly where is the file located? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: tempfile permissions

2004-07-24 Thread Gunnar Hjalmarsson
_file = 'z'; chmod 0755, $r_file or die "Cannot chmod $r_file: $!"; Err.. Since when doesn't 644 mean that a file is "world readable"? The difference between 755 and 644 is that the execute bit is set when the former is true, but if the file isn't going

Re: Sending emails when taint checking is on?

2004-08-13 Thread Gunnar Hjalmarsson
wrong... Any suggestions? A wild guess, without knowing what the error message is, is that you need to untaint $ENV{PATH}: $ENV{PATH} = ''; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: how to pass a string variable via URL redirection

2004-08-21 Thread Gunnar Hjalmarsson
t;Location" header (with or without CGI.pm's redirect() function), you can pass the string as a query string. But if cgi2 is another Perl program, using the require() function may be a better alternative. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubsc

Re: how to pass a string variable via URL redirection

2004-08-21 Thread Gunnar Hjalmarsson
[ Please do not top-post! ] Xiangli Zhang wrote: Gunnar Hjalmarsson wrote: Xiangli Zhang wrote: I am trying to redirect from cgi1(with one string variable say $str with value from its calling parent html form) to cgi2, I know I can use redirect function of CGI model to implement redirection. But i

Re: How to enumerate array elements?

2004-09-02 Thread Gunnar Hjalmarsson
That output wouldn't be correct, since the array contains six elements, not five. This code: my $ref = $me->{verd_result}->[0]; print "len = " . @$ref, "\n"; for ( 0 .. $#$ref ) { defined $ref->[$_] and print " v[$_]=$ref->[$_]\n"

Re: How to enumerate array elements?

2004-09-02 Thread Gunnar Hjalmarsson
Charles K. Clarkson wrote: Gunnar Hjalmarsson wrote: Siegfried Heintze wrote: Consider the following program: my $me; $me->{verd_result}->[0][2]=5; $me->{verd_result}->[0][5]=34; print "len = ", [EMAIL PROTECTED]>{verd_result}->[0]}}; for (@{$me->{verd_result}->[

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-06 Thread Gunnar Hjalmarsson
://groups.google.com/groups?threadm=1a1fc02.0408171946.2abd7dca%40posting.google.com Otherwise, post a short but complete program using Perl that illustrates the problem you tried to explain in English... -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
ld be easier to advise. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
[ Please type your reply *below* the quoted part of the message you are replying to. ] Chris Welch wrote: Gunnar Hjalmarsson wrote: Chris Welch wrote: I have a dilemma, I am processing CGI forms and I need to come up with a regex that will accept HTML entities (i.e., " or {), Your descri

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
e, and encode the HTML critical characters each time you read it for display, or you can encode the HTML critical characters before storing "stuff", so that the stored data come (partially) HTML encoded and ready for display whenever you read it. Let me know if you think I have misunde

Re: Month-Year Links....

2004-09-07 Thread Gunnar Hjalmarsson
m{curr} }; @{ $m{curr_2} } = back @{ $m{prev} }; my %months = map { $_, sprintf '%02d-%d', @{ $m{$_} } } qw/curr prev curr_2/; print "\$months{$_}: $months{$_}\n" for qw/curr prev curr_2/; Outputs: $months{curr}: 09-2004 $months{prev}: 08-2004 $months{curr_2

Re: Regex for accepting text and HTML *entities*

2004-09-09 Thread Gunnar Hjalmarsson
olves both the security issue AND the displaying in a web page issue? That being the case, surely it would be safer to convert things to entities on the off chance of something being a bit dodgy... Your approach is ... unusual, and AFAIU unnecessary. -- Gunnar Hjalmarsson Email: http://www.gunnar.c

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Gunnar Hjalmarsson
CGI.pm's escapeHTML() function. perldoc CGI -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Gunnar Hjalmarsson
gular expressions isn't so bad, but if you really want to do it right, it's worth pulling in a parsing engine like HTML::Parser or HTML::TreeBuilder or something along those lines... I can't see what this has to do with HTML parsing. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-

Re: table with variables

2004-09-09 Thread Gunnar Hjalmarsson
k here *after having tried* if you encounter problems that you are not able to resolve by help of the docs. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: CGI.pm : Handling Carriage Returns from textarea()

2004-09-09 Thread Gunnar Hjalmarsson
Chris Devers wrote: On Thu, 9 Sep 2004, Gunnar Hjalmarsson wrote: I can't see what this has to do with HTML parsing. The immediate problem has nothing to do with parsing, but it seemed like some of the suggestions given were starting to go in that direction. Maybe. The reason for my remark is

Re: cgi script that will auto-submit to another cgi

2004-09-13 Thread Gunnar Hjalmarsson
let the first script retrieve the output from the 3rd-party script by help of LWP::UserAgent, and have it display it. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://lea

Re: Quick table format question

2004-09-14 Thread Gunnar Hjalmarsson
calculating the width, something that I thought web browsers and HTML were designed to avoid. What am I missing to force the   cells to (at least) a fixed width? The width attribute for cells is deprecated. Try setting table width for the inner tables instead. -- Gunnar Hjalmarsson Email: http

Re: Quick table format question

2004-09-14 Thread Gunnar Hjalmarsson
o abandon tables for content positioning on HTML pages. But you would be better off if you asked that question in a forum for HTML. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] &l

Re: simultanious access

2004-09-18 Thread Gunnar Hjalmarsson
re of? Normally you need to be concerned about it. The fact that a program is invoked via CGI makes no difference in this respect. The flock() function is one way to deal with it in Perl. See "perldoc -f flock". -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsu

Re: Making the program run faster

2004-09-18 Thread Gunnar Hjalmarsson
cript is invoked, so in that respect I can understand what you mean. But would mod_perl have a significant impact on speed in any other respect? Isn't it still a set of code that shall be executed? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-ma

Re: Making the program run faster

2004-09-18 Thread Gunnar Hjalmarsson
, and I'd like to add CGI::Minimal to the list. Can you recommend me some tricks to make it work a little faster? No. If I want to use the OOP style, is it possible to load only some methods and not all? Sure, that's what you normally do, isn't it? However, whether you import a few fun

Re: Making the program run faster

2004-09-18 Thread Gunnar Hjalmarsson
Chris Devers wrote: Gunnar Hjalmarsson wrote: Chris Devers wrote: if you need a speed boost then the best strategies are to [a] use a smaller subset of CGI.pm, Does that really make a lot of difference? That was my understanding, but I admit I haven't benchmarked it. If only importing pa

Re: Using a variable in a perl module

2004-09-18 Thread Gunnar Hjalmarsson
t via its fully qualified name: $main::myvar -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Making the program run faster

2004-09-18 Thread Gunnar Hjalmarsson
Chris Devers wrote: Gunnar Hjalmarsson wrote: Btw, wonder how the autoloading affects that. I mean, when running under mod_perl, you normally *want* everything to be loaded at the start of the server, right? Well, everything you're likely to use, yeah. There doesn't seem to be muc

Re: undefined value error

2004-09-23 Thread Gunnar Hjalmarsson
he problem? Well, you are not even letting us know from which line that error message comes... I don't know anything about those modules you are using, but I suppose that their docs describe how to check for success. There is where I would start the debugging work. A mailing list should be th

Re: undefined value error

2004-09-23 Thread Gunnar Hjalmarsson
r instance opening files. So that's what I recommend you to do: Revise the code in the modules, and make sure you capture possible failures when they occur. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: Background info

2004-09-24 Thread Gunnar Hjalmarsson
;s possible to use a remote MTA instead. It should be noted that many scripts include a simple pipe to the local mail program, and a remote MTA precludes that technique. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Problem with flock

2004-09-27 Thread Gunnar Hjalmarsson
else Perl will complain about O_RDWR and/or O_CREAT instead. The latter are imported by default when using Fcntl, but need to be explicitly imported if you explicitly import anything else. perldoc Exporter -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe,

Re: Sorting a hash

2004-09-28 Thread Gunnar Hjalmarsson
g to do with CGI, so you should have posted it to the [EMAIL PROTECTED] list instead. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Sorting a hash

2004-09-28 Thread Gunnar Hjalmarsson
Aben Siatris wrote: DÅa Tuesday 28 September 2004 11:42 Gunnar Hjalmarsson napÃsal: Octavian Rasnita wrote: I have a hash that have multiple sub hashes and I want to sort it by a sub key. For example, I have: $comp{$code}{$year}{profit}. And I want to sort the $code values after the value of the

Re: Sorting a hash

2004-10-04 Thread Gunnar Hjalmarsson
Octavian Rasnita wrote: Gunnar Hjalmarsson wrote: You don't need another hash. perldoc -f sort perldoc -q "sort a hash" my @codes = sort { $comp{$a}{$year}{profit} <=> $comp{$b}{$year}{profit} } keys %comp; I have tried th

Re: tips for perl novice

2004-10-06 Thread Gunnar Hjalmarsson
Ivanca S wrote: I'm beginner in perl; I mean I have absolutely no experience. Could anybody tell me waht would be the first steps for learning perl? http://learn.perl.org/ I am intrested to write cgi perl scripts http://cgi.resourceindex.com/Documentation/CGI_Tutorials/ -- G

Re: Executing pdflatex via CGI script

2004-10-17 Thread Gunnar Hjalmarsson
OS X) To allow somebody but the web server to open a script created file for reading, have the script give it 0644 permissions. It sounds as if you need to read up on the Unix/Linux permissions system. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail

Re: Using $CGI::POST_MAX

2004-10-21 Thread Gunnar Hjalmarsson
t find a way in Lincoln's book to detect this condition so I can respond accordingly to the client. Does anyone here know how this might be done? It's explained in "perldoc CGI". -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PR

Re: Using $CGI::POST_MAX

2004-10-22 Thread Gunnar Hjalmarsson
>cgi_error()) { print $Q->header; $message = $Q->cgi_error(); &error_trap($message); } Yeah, I noticed too that the OO interface works. Nevertheless I'm inclined to believe that it is a bug in CGI.pm and/or its docs, but it would be good if somebody with more CGI.pm experience co

Re: untainting data

2004-11-10 Thread Gunnar Hjalmarsson
What can I do limit string length to 40 characters? Use a suitable function, or a regex, or something like that. What have you tried? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

Re: untainting data

2004-11-10 Thread Gunnar Hjalmarsson
note that people can submit to the script using e.g. their own form, so if you want to *make sure* that longer strings are not accepted, the maxlength attribute is not sufficient, and can *never* replace a proper validation of the form data. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-

Re: untainting data

2004-11-10 Thread Gunnar Hjalmarsson
int $res->content; As you can see, it's very easy to fake the HTTP_REFERER. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: using CGI module

2004-11-16 Thread Gunnar Hjalmarsson
Victor wrote: I need to access a variable like this: $cgi->param($variable); This doesn't work. But this works: $cgi->param('name'); The first try ($cgi->param($variable)) ends with a "Internal server error". Please post a short but complete program that illus

Re: One line file as an array

2004-11-25 Thread Gunnar Hjalmarsson
;/, $str_file); Please show us the form. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: One line file as an array (Form included)

2004-11-26 Thread Gunnar Hjalmarsson
hould add enctype="multipart/form-data" to the tag. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: die and exit

2007-08-15 Thread Gunnar Hjalmarsson
n't need to use any of the above methods. To have die messages appear in the browser you'd better do: use CGI::Carp 'fatalsToBrowser'; die "test die"; HTH -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e

Re: Cant Display the image...

2007-09-06 Thread Gunnar Hjalmarsson
something in my perl code You shouldn't store the file in the cgi-bin tree. Store it somewhere else, and you'll probably notice a difference. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: Cant Display the image...

2007-09-06 Thread Gunnar Hjalmarsson
econd message in this thread? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Cant Display the image...

2007-09-06 Thread Gunnar Hjalmarsson
This would be the path on the filesystem: /var/www/html/images/file.png while this would be one way to write the URL: /images/file.png " File does not exist: /var/www/html/var, referer: http://mymachine/cgi-bin/image.cgi"; -- Gunnar Hjalmarsson Email: http://www.gu

Re: Cant Display the image...

2007-09-08 Thread Gunnar Hjalmarsson
s already a document root, and the /images directory should have been put there. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: first steps with mod_perl

2007-09-18 Thread Gunnar Hjalmarsson
. Under xhtml-sctrict should be inserted: checked="checked"! How to achieve this? Other than printing the checkbox manually, I don't know. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: first steps with mod_perl

2007-09-23 Thread Gunnar Hjalmarsson
ang="en-US"> Hello World, Address, Colours START -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: first steps with mod_perl

2007-10-06 Thread Gunnar Hjalmarsson
-BGCOLOR=>'blue', -dtd=>[ '-//W3C//DTD XHTML 1.0 Strict//EN', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd' ] ); But the resulting markup does not validate as XHTML 1.0 Strict, does it? I'm thinking of t

Re: Removing leading and trailing spaces

2007-10-06 Thread Gunnar Hjalmarsson
Judy & Jim Schueckler wrote: I need code to remove one or more leading or trailing spaces without removing internal spaces. perldoc -q space -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Re: Huge cgi!Help!pop3 Client

2007-10-07 Thread Gunnar Hjalmarsson
Zazen wrote: Hi dude! I have an orrible trouble with this poor cgi: is a client pop3 web based gateway.The function "connetti()" never been called and i don't know why!! ... Weren't the advices you got in comp.lang.perl.misc good enough? -- Gunnar Hjalmarsson Email: http

Re: Possible Perl/CGI Application

2007-10-23 Thread Gunnar Hjalmarsson
wns, etc. I am experienced in Perl and have have worked with simple HTML. I was told CGI might be the way to go in developing such an application. My question is, does that seem reasonable? Absolutely. Please study the CGI.pm docs to get started. perldoc CGI -- Gunnar Hjalmarsson Email: http://ww

Re: How to detect if a text body contains forbidden words

2007-11-20 Thread Gunnar Hjalmarsson
stop spam. The 'spamfilter' regex is one of them, and there is also a cookie based method for preventing automated messages from being sent. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: mod_perl newbie gotcha

2007-11-20 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: The problem is that after the first successful send/receive, all subsequent executions contain the same initial data: the parameters never get reset with 'newer' data. I wasn't able to reproduce the described problem. -- Gunnar Hjalmarsson Email: http:

Re: mod_perl newbie gotcha

2007-11-22 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: On Nov 20, 11:52 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: [EMAIL PROTECTED] wrote: The problem is that after the first successful send/receive, all subsequent executions contain the same initial data: the parameters never get reset with 'newer'

Re: CGI termination.

2007-12-07 Thread Gunnar Hjalmarsson
ming you are using CGI.pm, print header(-status => '204 No Content'); HTH -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: perl for uploading file shows weird characters.

2008-01-12 Thread Gunnar Hjalmarsson
e I have done: Well, the code you posted is far too much to my taste. Please post a _small_ but complete program that illustrates the problem you are having. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: uploading a file with perl

2008-01-13 Thread Gunnar Hjalmarsson
search.cpan.org/perldoc?CGI::UploadEasy#EXAMPLE -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Looping Dates.

2008-01-19 Thread Gunnar Hjalmarsson
generate a list of dates: Why are you asking this question on the beginners-cgi list? Anyway, the code in this message might be useful to you: http://www.mail-archive.com/[EMAIL PROTECTED]/msg90421.html -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail

Re: Process Directory and subdirectories Recursively

2008-01-28 Thread Gunnar Hjalmarsson
Mimi Cafe wrote: Hi, I am trying to process a directory and all subdirectory recursively and Please do not multi-post!! -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: DeletePage

2008-03-18 Thread Gunnar Hjalmarsson
< Maybe you meant that to be sub deletePage { You need a content-type header here. print CGI::header(); print "File was deleted successfully!"; } -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: Extracting TD's from a Text File (Regex Help).

2008-04-08 Thread Gunnar Hjalmarsson
# slurp the whole thing $links = <$TXT>;# into a scalar } while ( $links =~ m|(.+?)|gsi ) { print "$1\n"; } -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Sendmail

2008-04-10 Thread Gunnar Hjalmarsson
command line and got: Undefined subroutine &main::populateEmail called at ./cgi_list_bug.pl line 6 This same question (without the missing 'sub') has already been asked and answered in clpmisc. http://groups.google.com/group/comp.lang.perl.misc/browse_frm/thread/c8c266eb779a4cb4

Re: Determine upload file type

2008-06-20 Thread Gunnar Hjalmarsson
reliable way to determine e.g. text or binary. What's the purpose of your desire to know the file type? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Send email using SMTP

2009-01-07 Thread Gunnar Hjalmarsson
age about an insecure environment command. Did it just say "insecure environment"? On my box it says: "Insecure $ENV{PATH} ...", which means that you need to untaint the $ENV{PATH} variable. The easiest way to do that is: $ENV{PATH} = ''; Please read more about Perl

Re: Send email using SMTP

2009-01-08 Thread Gunnar Hjalmarsson
Adam Jimerson wrote: Gunnar Hjalmarsson wrote: Adam Jimerson wrote: are you using the -T switch on your script? When I tried to open "/usr/bin/mail" with that switch on I get a error message about an insecure environment command. Did it just say "insecure environment"

Re: Send email using SMTP

2009-01-09 Thread Gunnar Hjalmarsson
Adam Jimerson wrote: Gunnar Hjalmarsson wrote: Adam Jimerson wrote: Do I need to specify anything for the $ENV{PATH} or do I just leave it blank It depends. You have to take into consideration whether your program relies on any of the paths. If not, it's fine to leave it blank. The

Re: Send email using SMTP

2009-01-09 Thread Gunnar Hjalmarsson
Dermot Paikkos wrote: This is all very OT Is a discussion about taintedness off topic on a Perl-CGI list? Don't think so. and the thread is running strongly on perl-beginners. :-/ And...? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e

Opening a pipe when taint mode is enabled (was: Send email using SMTP)

2009-01-09 Thread Gunnar Hjalmarsson
Adam Jimerson wrote: Gunnar Hjalmarsson wrote: There is only one suspected variable to consider, i.e. $name, which is probably tainted. Untaint it, and you are done. ( You remember where to find out how, right? ;-) ) According to perlsec I need to use it as a key in a hash or reference a

Re: Opening a pipe when taint mode is enabled

2009-01-10 Thread Gunnar Hjalmarsson
l => '/style/ContactForm.css', ); You find the module at CPAN: http://search.cpan.org/dist/CGI-ContactForm/ -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/

Re: Opening a pipe when taint mode is enabled

2009-01-11 Thread Gunnar Hjalmarsson
Adam Jimerson wrote: Gunnar Hjalmarsson wrote: You don't say what to do if the untainting fails. This code: if ($name =~ /^([...@\w.]+)$/) { $name = $1; }; should better be: if ($name =~ /^([...@\w.]+)$/) { $name = $1; } else { die "Untainting of the name failed"; } Pleas

Re: Opening a pipe when taint mode is enabled

2009-01-11 Thread Gunnar Hjalmarsson
Adam Jimerson wrote: On Jan 11, 8:21 am, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: Adam Jimerson wrote: It seams I over looked the space, is it possible to include spaces in the search string? Of course it is. What you call search string is a regular expression. Obviously you have some

Re: Opening a pipe when taint mode is enabled

2009-01-12 Thread Gunnar Hjalmarsson
Adam Jimerson wrote: Gunnar Hjalmarsson wrote: Adam Jimerson wrote: Yea I looked it up and all I needed to do was add \s for whitespaces, Which would also allow for newlines. That sounds dangerous to me, and is an example why it's not a good idea to write your own code, that allows

Re: How to send arguments with a redirect?

2009-01-15 Thread Gunnar Hjalmarsson
).'='.uri_escape($args{$key}); } my $query = join ';', @args; print $q->redirect("$url?$query"); -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/

Re: Regarding opening web page scripted in perl and cgi

2009-01-15 Thread Gunnar Hjalmarsson
"cwt_page_content" with page_id = 5/// I need to make changes in that page source. I am unable to find where that page is located. Can you please help me telling how to find those files to change the content in that. Look in the source of index.cgi. -- Gunnar Hjalmarsson Email: http://www

Re: What does MakeFile do?

2009-01-18 Thread Gunnar Hjalmarsson
Lewis Kirk wrote: Which is obviously a real beginner question. Yes, but not a CGI question in any way. Please post it to the beginners list instead. When you do, post as a new message, and not as a reply to a message about some other topic. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc

Re: get no info by $cgi->uploadInfo()

2009-02-06 Thread Gunnar Hjalmarsson
ike a module I wrote, CGI::UploadEasy, could be useful to you. http://search.cpan.org/dist/CGI-UploadEasy/ -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@per

Re: Need some information about perl documentation.

2009-02-12 Thread Gunnar Hjalmarsson
tanding of small code fragments, provided that you try on your own first. Please post such possible questions to the beginners list, unless they are CGI related. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@pe

Re: Email Purge Duplicates

2009-02-23 Thread Gunnar Hjalmarsson
t...@asgweb.net wrote: I have a routine that is intended to purge duplicates from a list of emails. It's currently not working. perldoc -q duplicate What has this to do with CGI? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: begi

Re: Retrieving Cookies does not return all domain values

2009-02-26 Thread Gunnar Hjalmarsson
me, $value; push @cookie_values, $value if $name eq 'var'; } -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/

  1   2   >