RE: cgi.pm generate html vs. print EndOfHTML;
On Thu, 16 Jan 2003 at 16:32, Hughes, Andrew opined: HA:I am pointing to the results.tmpl file which is in the same folder as the HA:the .pl script. I found another test script on the web on another website, HA:and I have the same problem -- the tags are not replaced with the HA:information in the script. Could it be a permission issues on the .tmpl HA:file or the .pl file? you need to point to the perl script, not the template file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cgi.pm generate html vs. print EndOfHTML;
Actually, I am sort of embarrassed (and proud) to say that I figured out that one late last night. It works now. Thanks for all of your help ... and patience as usual. Andrew -Original Message- From: fliptop [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:15 AM To: Hughes, Andrew Cc: '[EMAIL PROTECTED]' Subject: RE: cgi.pm generate html vs. print EndOfHTML; On Thu, 16 Jan 2003 at 16:32, Hughes, Andrew opined: HA:I am pointing to the results.tmpl file which is in the same folder as the HA:the .pl script. I found another test script on the web on another website, HA:and I have the same problem -- the tags are not replaced with the HA:information in the script. Could it be a permission issues on the .tmpl HA:file or the .pl file? you need to point to the perl script, not the template file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ISP won't install Perl modules
Hi all, My ISP won't install some Perl modules I want to use (Email::Valid and Mail::Address). Is there a way to install these modules in some directory I have access to so I'll be able to use them ? Kind regards, Rene Verharen Please DO NOT reply to me personally. I'll get my copy from the list. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ISP won't install Perl modules
Rene, If it is a pure perl module (I believe Email::Valid is), you can put it in one of your directories and push/unshift it into @INC. In some cases you may have to do that push or unshift inside a BEGIN so that the interpreter sees that action before reading @INC. Another option is to find a web host that willingly installs modules for you. I'm working with one now that is great about this. If you'd like more info, e-mail me offline from the list. Thanks! - Scot Robnett inSite Internet Solutions [EMAIL PROTECTED] -Original Message- From: Rene Verharen [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:19 AM To: Beginners-CGI List Subject: ISP won't install Perl modules Hi all, My ISP won't install some Perl modules I want to use (Email::Valid and Mail::Address). Is there a way to install these modules in some directory I have access to so I'll be able to use them ? Kind regards, Rene Verharen Please DO NOT reply to me personally. I'll get my copy from the list. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML with perl
Hi, I am using perl for the first time. Can anyone please send me some links where I can find information and examples of Perl modules for XML programming. thanks in advance, Vijay [EMAIL PROTECTED] wrote: On Fri, 17 Jan 2003 15:18:42 +0100, Rene Verharen [EMAIL PROTECTED] wrote: Hi all, My ISP won't install some Perl modules I want to use (Email::Valid and Mail::Address). Is there a way to install these modules in some directory I have access to so I'll be able to use them ? You didn't state whether you can login at a terminal prompt, so I will assume so, but this isn't necessary either. At a terminal you should be able to set PERL5LIB environment variable in your shell to point to whatever directory you wish the modules to live under, for instance HOME/lib where HOME is your home directory, then just run perl -MCPAN -e shell and install as normal. Then in your scripts you will have to add a 'use lib' line, similar to: use lib '/HOME/lib'; Before you 'use' any of the modules in that directory. This is the easiest way, if you must install by hand then you will most likely need to pass a PREFIX=/path/to/lib/dir directive to perl Makefile.pl, and if you don't have a terminal, then you should be able to install a local version where you are doing your development and then just recursively upload the directory, but this is dangerous as you must make sure the two environments match before installing. HTH, http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This communication is intended for the addressee(s) and may contain confidential and legally privileged information. We do not waive confidentiality or privilege by mistransmission. If you have received this communication in error, any use, dissemination, printing or copying is strictly prohibited; please destroy all electronic and paper copies and notify the sender immediately. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ISP won't install Perl modules
Similar (If it is a pure perl module) - If you are using cgi-bin as is typical, you can place the module into your cgi-bin path.../cgi-bin/Email and refer to as usual in your perl script, i.e. use Email::Valid; (This can clutter up cgi-bin..., but it worked for me.) Scot Robnett wrote: Rene, If it is a pure perl module (I believe Email::Valid is), you can put it in one of your directories and push/unshift it into @INC. In some cases you may have to do that push or unshift inside a BEGIN so that the interpreter sees that action before reading @INC. Another option is to find a web host that willingly installs modules for you. I'm working with one now that is great about this. If you'd like more info, e-mail me offline from the list. Thanks! - Scot Robnett inSite Internet Solutions [EMAIL PROTECTED] -Original Message- From: Rene Verharen [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:19 AM To: Beginners-CGI List Subject: ISP won't install Perl modules Hi all, My ISP won't install some Perl modules I want to use (Email::Valid and Mail::Address). Is there a way to install these modules in some directory I have access to so I'll be able to use them ? Kind regards, Rene Verharen Please DO NOT reply to me personally. I'll get my copy from the list. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XML with perl
On Fri, 17 Jan 2003 15:00:22 +, Paluparthi Kumar [EMAIL PROTECTED] wrote: Hi, I am using perl for the first time. Can anyone please send me some links where I can find information and examples of Perl modules for XML programming. O'Reilly has an excellent book on this subject though it does expect some understanding of Perl and using modules: http://www.oreilly.com/catalog/perlxml/ For a list of available modules, you can check here: http://search.cpan.org/modlist/String_Language_Text_Processing/XML Most modules on that list come with good documentation and some examples. You may want to start with XML::Simple and work your way to more complex tasks. And this should answer many questions of where to head next, http://www.xmlproj.com/perl-xml-faq.dkb http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cgi.pm generate html vs. print EndOfHTML;
I'm new to the HTML::Template module as well, but from what I can see, it beats the pants off using print eohJust out of curiosity (and maybe for the sake of the list) did your problem have to do with the syntax of the TMPL_VAR tag? I don't think you are suppose to use a name attribute, I think you just put the name of the parameter in the tag. TMPL_VAR SECRET_MESSAGE instead of TMPL_VAR NAME=SECRET_MESSAGE Don't be embarrassed - in three days nobody on this list figured it out! -Derrick On Friday, Jan 17, 2003, at 09:03 US/Eastern, Hughes, Andrew wrote: Actually, I am sort of embarrassed (and proud) to say that I figured out that one late last night. It works now. Thanks for all of your help ... and patience as usual. Andrew -Original Message- From: fliptop [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:15 AM To: Hughes, Andrew Cc: '[EMAIL PROTECTED]' Subject: RE: cgi.pm generate html vs. print EndOfHTML; On Thu, 16 Jan 2003 at 16:32, Hughes, Andrew opined: HA:I am pointing to the results.tmpl file which is in the same folder as the HA:the .pl script. I found another test script on the web on another website, HA:and I have the same problem -- the tags are not replaced with the HA:information in the script. Could it be a permission issues on the .tmpl HA:file or the .pl file? you need to point to the perl script, not the template file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cgi.pm generate html vs. print EndOfHTML;
My problem had to do with the content header. I also did not realize that you are supposed to point the .pl file in the browser. Rookie mistakes! As far as the TMPL_VAR tags, all of the tutorials that I have seen look like this TMPL_VAR NAME=SECRET_MESSAGE -- as opposed to TMPL_VAR SECRET_MESSAGE. Thanks, Andrew -Original Message- From: Derrick Spell [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 1:53 PM To: Hughes, Andrew Cc: [EMAIL PROTECTED] Subject: Re: cgi.pm generate html vs. print EndOfHTML; I'm new to the HTML::Template module as well, but from what I can see, it beats the pants off using print eohJust out of curiosity (and maybe for the sake of the list) did your problem have to do with the syntax of the TMPL_VAR tag? I don't think you are suppose to use a name attribute, I think you just put the name of the parameter in the tag. TMPL_VAR SECRET_MESSAGE instead of TMPL_VAR NAME=SECRET_MESSAGE Don't be embarrassed - in three days nobody on this list figured it out! -Derrick On Friday, Jan 17, 2003, at 09:03 US/Eastern, Hughes, Andrew wrote: Actually, I am sort of embarrassed (and proud) to say that I figured out that one late last night. It works now. Thanks for all of your help ... and patience as usual. Andrew -Original Message- From: fliptop [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 8:15 AM To: Hughes, Andrew Cc: '[EMAIL PROTECTED]' Subject: RE: cgi.pm generate html vs. print EndOfHTML; On Thu, 16 Jan 2003 at 16:32, Hughes, Andrew opined: HA:I am pointing to the results.tmpl file which is in the same folder as the HA:the .pl script. I found another test script on the web on another website, HA:and I have the same problem -- the tags are not replaced with the HA:information in the script. Could it be a permission issues on the .tmpl HA:file or the .pl file? you need to point to the perl script, not the template file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Solved: ISP won't install Perl modules
Hi all, At 17-01-2003 15:18 +0100, I wrote: My ISP won't install some Perl modules I want to use (Email::Valid and Mail::Address). Is there a way to install these modules in some directory I have access to so I'll be able to use them ? I installed the modules in a different dir and solved the problem this way : push(@INC, /path/to/my/modules); Thanks for your response. Kind regards, Rene Verharen Please DO NOT reply to me personally. I'll get my copy from the list. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Crypted script ?
Hi all, I found a (commercial) script on the net which shows me all the installed Perl Modules. Trying to see how thing were done showed me that this script was sort of cripted : #!/usr/bin/perl $lEECXCBBXCBEXAECAXBACXDCDXDEDBXAADXDDBXCDABXAEAXEDAXABACXCEAXA --cut-- Almost no human readable text in it. Can someone tell me more about how this is done or point me at a doc I should read ? Kind regards, Rene Verharen Please DO NOT reply to me personally. I'll get my copy from the list. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cgi.pm generate html vs. print EndOfHTML;
On Fri, 17 Jan 2003 at 14:29, Hughes, Andrew opined: HA:My problem had to do with the content header. I also did not realize that HA:you are supposed to point the .pl file in the browser. Rookie mistakes! HA: HA:As far as the TMPL_VAR tags, all of the tutorials that I have seen look HA:like this TMPL_VAR NAME=SECRET_MESSAGE -- as opposed to TMPL_VAR HA:SECRET_MESSAGE. it can be done either way: #!/usr/bin/perl -w use strict; use HTML::Template; my %data = ( ONE = 'one', TWO = ' /two' ); my $template = HTML::Template-new(filename = 'onetwo.tmpl'); $template-param(%data); print Content-type: text/html\n\n; print $template-output; if 'onetwo.tmpl' contains either the following: TMPL_VAR ESCAPE=HTML ONE TMPL_VAR ESCAPE=URL TWO or this: TMPL_VAR ESCAPE=HTML NAME=ONE TMPL_VAR ESCAPE=URL NAME=TWO the output is always: Content-type: text/html amp;one %20%2Ftwo -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Search database problem.
On Fri, 17 Jan 2003 at 17:10, Hughes, Andrew opined: [snip] HA:The goal is that before I submit a form submission to the database, I want HA:to make sure that someone with the same email address has not already HA:submitted it. If the count(*) brings up anything greater than 0 then the HA:users has already submitted an entry and receives the Duplicate Entry [snip] why don't you put a unique index on the email field? that will prevent duplicate records and save you a lot of overhead using perl to check for uniqueness. then, when you go to insert a new record, wrap it in an eval {}. if $@ contains something after the insert attempt, it's probably because the unique index constraint was violated. for example: my $sth = $dbh-prepare('insert into (foo) values(?)'); eval { $sth-execute('[EMAIL PROTECTED]'); }; if ($@) { warn error - probably a violation of the unique constraint; # return something to the user } else { $dbh-commit; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Naming a variable from value of a scalar.
Is it possible to name a variable as the numeric value of a scalar? Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TEst
__ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]