Re: content type headers

2009-07-02 Thread Gunnar Hjalmarsson
. What if you simply try to view an image with FF directly? http://www.example.com/images/someimage.jpg If that's not displayed as expected, there may be something with the configuration of your FF browser. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl

Re: content type headers

2009-07-02 Thread Gunnar Hjalmarsson
extension gives image/png etc. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl # This is a comment. I love comments. # This file controls what Internet media types are sent to the client for # given file extension(s). Sending the correct media type to the client

Re: Storing a file from a cgi parameter

2009-06-17 Thread Gunnar Hjalmarsson
or what should I do in order to make it work? I suggest that you try the CGI::UploadEasy module. 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

Re: how to add support of Msql and CGI in Apache

2009-04-14 Thread Gunnar Hjalmarsson
be very specific about what you have tried, which error messages you get etc. These general guidelines about asking questions on technical lists and newsgroups may be useful: http://www.catb.org/~esr/faqs/smart-questions.html -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl

Re: user sessions

2009-03-04 Thread Gunnar Hjalmarsson
? http://search.cpan.org/search?query=session -- 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: Retrieving Cookies does not return all domain values

2009-02-26 Thread Gunnar Hjalmarsson
, $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/

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: beginners

Re: Need some information about perl documentation.

2009-02-12 Thread Gunnar Hjalmarsson
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...@perl.org

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

2009-02-06 Thread Gunnar Hjalmarsson
like 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

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: How to send arguments with a redirect?

2009-01-15 Thread Gunnar Hjalmarsson
; 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.gunnar.cc/cgi

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: 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; } Please consider

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-10 Thread Gunnar Hjalmarsson
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: 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 only

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-mail

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

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? On my box it says

Re: Send email using SMTP

2009-01-07 Thread Gunnar Hjalmarsson
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 security in perldoc perlsec. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe

Re: Determine upload file type

2008-06-20 Thread Gunnar Hjalmarsson
is not a 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: Sendmail

2008-04-10 Thread Gunnar Hjalmarsson
: Undefined subroutine main::populateEmail called at ./cgi_list_bug.pl line 6 snip 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 -- Gunnar Hjalmarsson Email: http

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|td\s+class=PhorumTableRowAlt thread.*?(.+?)/td|gsi ) { print $1\n; } -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: DeletePage

2008-03-18 Thread Gunnar Hjalmarsson
; form action=files.cgi method=POST input type=hidden name=cmd value=delete Maybe you meant that to be input type=hidden name=cmd value=true sub deletePage { You need a content-type header here. print CGI::header(); print File was deleted successfully!br; } -- Gunnar

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: Looping Dates.

2008-01-19 Thread Gunnar Hjalmarsson
? that will 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: uploading a file with perl

2008-01-13 Thread Gunnar Hjalmarsson
/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: perl for uploading file shows weird characters.

2008-01-12 Thread Gunnar Hjalmarsson
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: CGI termination.

2007-12-07 Thread Gunnar Hjalmarsson
, 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: 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' data. I

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://www.gunnar.cc

Re: Possible Perl/CGI Application

2007-10-23 Thread Gunnar Hjalmarsson
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://www.gunnar.cc/cgi

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://www.gunnar.cc/cgi-bin

Re: first steps with mod_perl

2007-10-06 Thread Gunnar Hjalmarsson
' ] ); But the resulting markup does not validate as XHTML 1.0 Strict, does it? I'm thinking of the 'target' and 'bgcolor' attributes. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

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-mail

Re: first steps with mod_perl

2007-09-23 Thread Gunnar Hjalmarsson
/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; lang=en-US head titleHello World, Address, Colours/title link type=text/css media=screen rel=stylesheet href=../styles/style.css / /head body START -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl

Re: first steps with mod_perl

2007-09-18 Thread Gunnar Hjalmarsson
like. Or is this probably the configuration on the server, No. I am trying to produce valid html. ... 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

Re: Cant Display the image...

2007-09-06 Thread Gunnar Hjalmarsson
missing 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-mail

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.gunnar.cc/cgi-bin

Re: die and exit

2007-08-15 Thread Gunnar Hjalmarsson
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-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

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

2004-11-26 Thread Gunnar Hjalmarsson
=_blank table cellpadding=2 cellspacing=2 border=0 width=400 align=centertbodytr td align=rightCreate services SQL file: /td td valign=topinput type=file name=file/td You should add enctype=multipart/form-data to the form tag. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin

Re: One line file as an array

2004-11-25 Thread Gunnar Hjalmarsson
); 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: 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 illustrates your observation. -- Gunnar

Re: untainting data

2004-11-10 Thread Gunnar Hjalmarsson
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 PROTECTED] http

Re: untainting data

2004-11-10 Thread Gunnar Hjalmarsson
, but please 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

Re: untainting data

2004-11-10 Thread Gunnar Hjalmarsson
. -- 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::POST_MAX

2004-10-22 Thread Gunnar Hjalmarsson
()) { 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 could comment on it. -- Gunnar

Re: Using $CGI::POST_MAX

2004-10-21 Thread Gunnar Hjalmarsson
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 PROTECTED] For additional commands, e

Re: Executing pdflatex via CGI script

2004-10-17 Thread Gunnar Hjalmarsson
in 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: 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/ -- Gunnar

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 that, but it gave me an error

Re: Sorting a hash

2004-09-28 Thread Gunnar Hjalmarsson
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: Da Tuesday 28 September 2004 11:42 Gunnar Hjalmarsson napsal: 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

Re: Problem with flock

2004-09-27 Thread Gunnar Hjalmarsson
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, e-mail: [EMAIL PROTECTED

Re: Background info

2004-09-24 Thread Gunnar Hjalmarsson
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 commands, e-mail: [EMAIL

Re: undefined value error

2004-09-23 Thread Gunnar Hjalmarsson
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 the *last* resort. -- Gunnar Hjalmarsson Email: http

Re: undefined value error

2004-09-23 Thread Gunnar Hjalmarsson
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 additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org

Re: simultanious access

2004-09-18 Thread Gunnar Hjalmarsson
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 unsubscribe, e-mail

Re: Making the program run faster

2004-09-18 Thread Gunnar Hjalmarsson
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-mail: [EMAIL

Re: Making the program run faster

2004-09-18 Thread Gunnar Hjalmarsson
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 function names or not has probably very little impact on speed. -- Gunnar Hjalmarsson

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 part

Re: Using a variable in a perl module

2004-09-18 Thread Gunnar Hjalmarsson
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 much point

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 nbsp 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
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] http://learn.perl.org/ http

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

2004-09-13 Thread Gunnar Hjalmarsson
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://learn.perl.org/ http

Re: Regex for accepting text and HTML *entities*

2004-09-09 Thread Gunnar Hjalmarsson
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.cc/cgi

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

2004-09-09 Thread Gunnar Hjalmarsson
. 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
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-bin/contact.pl

Re: table with variables

2004-09-09 Thread Gunnar Hjalmarsson
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

Re: Regex for accepting text and HTML *entities*

2004-09-07 Thread Gunnar Hjalmarsson
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 misunderstood anything. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

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: How to enumerate array elements?

2004-09-02 Thread Gunnar Hjalmarsson
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; } outputs: len = 6 v[2]=5 v[5]=34 -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl

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}-[0]}){ print \n v=; print; } It produces

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: tempfile permissions

2004-07-24 Thread Gunnar Hjalmarsson
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
'; 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 to be executed, 644 should be just fine. -- Gunnar Hjalmarsson

Re: Mailing Script

2004-07-14 Thread Gunnar Hjalmarsson
::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 for future versions. -- Gunnar

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

2004-07-12 Thread Gunnar Hjalmarsson
' 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 Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

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 convenience

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.pl); system(phrap fasta1) == 0 or die 'phrap fasta1' failed

Re: Executing a subroutine from a runtime chosen module

2004-07-10 Thread Gunnar Hjalmarsson
(); } 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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Sending attachments in perl

2004-07-08 Thread Gunnar Hjalmarsson
: 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 unsubscribe, e-mail

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
= 'running.pdf'; snip 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/contact.pl

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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 commands, e-mail: [EMAIL PROTECTED] http

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 = 'localhost'; I can't see

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 Email: http://www.gunnar.cc/cgi-bin

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 strict; use

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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 -- Gunnar Hjalmarsson Email

Re: Mailing Script

2004-07-08 Thread Gunnar Hjalmarsson
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 Email: http://www.gunnar.cc/cgi-bin/contact.pl

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

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 that makes

Re: Script does not work on IE

2004-07-07 Thread Gunnar Hjalmarsson
: http://willamette.edu/dept/comm/wtreport/login.cgi You need to close the HTML comment that begins right after style type=text/css -- 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: beginning question for cgi

2004-07-04 Thread Gunnar Hjalmarsson
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