Sendmail

2008-04-10 Thread Perl CGI script enhancer
my $email = populateEmail(test); print $email; open(SENDMAIL, |/usr/lib/sendmail -oi -t -i) or print cannot open SENDMAIL: $!; print SENDMAIL EOF; From: [EMAIL PROTECTED] To:${email} Subject: [SUSTAINING TICKET] Case Content-type: text/html testing.. EOF close(SENDMAIL); When i

Fast CGI or Multithreaded CGI

2006-12-16 Thread Perl
Hello I am in process of writing a cgi program to reload tomcat applications over network. and I know that I should write it Multithreaded cgi or with Fastcgi, but I don't know which one works better for me. would you please let me know the advantage of each over other one. also would you

Re: File::Find

2006-11-27 Thread Perl
Hello I am using File::Find to find files located at a $dir directory, however it goes through all subdirectories. I mean I don't want to search recursively. Also which module you recommend for search and print through the files that File::Find will find. Thanks for help Adam -- To

Re: incorporer du php dans une page en perl-cgi ?

2005-12-03 Thread Perl Hack
translation Hi! Is there a way to incorporate the output of a php page in a cgi-perl [script]/page? I would like to incorporate a page from Wordpress in a cgi-perl [script]/page, without having to use frames. Thanks! /translation Eco, I thought I help English readers understand your

GD::Graph::Bars how to separate bar sets

2004-10-25 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I am using GD::Graph::Bars to make four bar graphs for each month. I cannot figure out how to separate the sets of bars from each other. As it is, I have 48 vertical bars (4 x 12) all in a row. I want to show some separation between each set of four bars (4 bars for each month). I do not see any

writing to a file

2004-05-20 Thread PerlDiscuss - Perl Newsgroups and mailing lists
in the cgi-bin folder? Any help for an absolute beginner appreciated. steve #!/usr/local/bin/perl $Msg = ; if( ! open (LOGFILE, log.dat) ){ $Msg = OpenFailed; } else { $Msg = OpenWorked; #print LOGFILE $Msg; close (LOGFILE) ; } print Content-type: text/html\n\n

replacing characters in a string

2004-05-19 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I cant find a simple perl function to replace characters in a string. Im trying to inserts strings like bob's into a database and need to convert that to bob''s so that sql doesnt whine when i do an insert. Any suggestions? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: replacing characters in a string

2004-05-19 Thread PerlDiscuss - Perl Newsgroups and mailing lists
- Yes I am using DBI. That's perfect, I didnt realize they had this functionality, but it makes alot of sense that they do. Thank you, thank you. Wiggins D Anconia wrote: I cant find a simple perl function to replace characters in a string. Im trying to inserts strings like bob's

CGI::Framework?

2003-10-28 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Where can I find documentation, tutorials, examples for CGI::Framework - the cpan documentation is not enough for me :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

CGI::Framework?

2003-10-28 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hello! I'm going to write my first perl script and I need Session handling, authentification and a simple cgi application. I tried to use CGI::Framework but I hardly find any documentation about this module except the one at cpan. I tried the example but when I submit from my enterusername htm

CGI::Session and mysql dbh

2003-10-24 Thread perl
If I store a dbh in a session as in, $session-param(DB,$dbh), what happen when the session expire due to expire setting? Will the dbh still be in memory or cleaned up? -thanks - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail:

Determine return value of new CGI::Session(...)

2003-10-21 Thread perl
How can I determine if the return value if it is a new or current session? $session=new CGI::Session(driver:File, $cgi, {Directory='/tmp'}); This calls return a $session but I can't determin in the program if it was new or current. I'm looking for something like below: if($session=new

Where is Apache::Session

2003-10-20 Thread perl
I'm looking for the download of Apache::Session. There is a lot of docs on it but where is the download? thanks - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Where is Apache::Session

2003-10-20 Thread perl
-thanks On CPAN. http://search.cpan.org/~jbaker/Apache-Session-1.54/ Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 20, 2003 6:15 PM To: [EMAIL PROTECTED] Subject: Where is Apache::Session I'm looking for the download of

Apache::Session vs CGI::Session?

2003-10-20 Thread perl
Can someone comment on some advantages/disadvantages? Does opening a new browser causes a new session in either of the two? thanks - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Which button clicked?

2003-10-14 Thread perl
Can someone show me how to determine which button the user clicked? use CGI; $cgi-param did not contain the action parameter. I want to determine if the user click the LEFT or RIGHT button: ... input type=submit value=LEFT input type=submit value=RIGHT ... thanks -rkl

Best Token Char For Template

2003-10-07 Thread perl
1 - What is the best char to use in a file template? Also, please give me a good regex? I will have a formatted html page with some keys that I want to replace. For example, ... !-- here my token is a ! -- tdFirst Name:/tdtd!fname!/td tdLast Name:/tdtd~!lname!/td ... 2 - Can I read in the

RE: cgi mail script anyone?

2003-10-07 Thread perl
the switches you specify, Or use the data in the format you specify. I love Mail::Sender and I'm actually in the middle of a module that simplifies even using that (if you can imagine), Once done it will look like this: #/usr/bin/perl use strict; use warnings; use WhateverTheHeckICallTheModule

RE: cgi mail script anyone?

2003-10-07 Thread perl
Great, I got the use lib to work but where is the directory for these modules you mentioned (on linux): No you wouldn't not if you install it via cpan (IE it's in a standard directory already in @INC) Same with any other module, Net::SMTP, Mail::Sender, I did a find but it did not find it.

RE: cgi mail script anyone?

2003-10-07 Thread perl
not if you install it via cpan (IE it's in a standard directory already in @INC) Same with any other module, Net::SMTP, Mail::Sender, I did a find but it did not find it. find / -name Mail.pm -print a better way to find that will be: [panda]$ perl -MNet::SMTP -le 'print $INC{Net/SMTP.pm}' /usr/lib

RE: cgi mail script anyone?

2003-10-07 Thread perl
#/usr/bin/perl use strict; use warnings; use WhateverTheHeckICallTheModule qw(emailx); emailx({ ip = '1.2.3.4', to = '[EMAIL PROTECTED]', fr = '[EMAIL PROTECTED]', sb = 'Inquiry Response Request', ms = $emailmessagehere }) or die No sendy mial

Re: cgi mail script anyone?

2003-10-04 Thread perl
Thanks, you did good with this code for me. I did not want to load more library as most suggested. This works just fine with only one exception. I needed to use the -t option. Here is the revised version which worked for me: #/usr/bin/perl use strict; use warnings; my $mailprog = '/usr/sbin

cgi mail script anyone?

2003-10-03 Thread perl
I need to send a mail from the cgi. It must be able to have a reply or sender as someone different from the local web owner (apache). My configuration: redhat 9/qmail/vpopmail The example below will be typically what I want: To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: hello support

RE: cgi mail script anyone?

2003-10-03 Thread perl
I'm just trying to send mail from a programming script NOT a real client. For example, a monitor script calculating the disk storage and sending a report/alert via the perl program. I really don't want to add more library or module than necessary. So if you guys can detect something wrong

show job status

2003-10-02 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I have a CGI script that takes some time to finish searching the DB. In the meanwhile, how do I show that the job is being processed? I tried just simple printing the same, but it wouldnt show up until the search is over. I tried using threads with the same result. Thanks. -- P -- To

separating functionality

2003-09-26 Thread perl
Sorry to ask this question here but I can't seem to get the beginner perl list to work for me. What is the concept/functionality to put functions or sub in a separate file? I'm thinking something like creating a file for basic resusable functions/sub like maybe require or include or something

Need Some Help!!!!!

2003-01-24 Thread perl
I looked up to see what the server error log was saying. This is what it has: Premature end of script headers: /home/donmike/www/cgi-bin/file.cgi I live in Panama City, Fl. As you can see, I am kinda new at using perl. I have taken courses on C++, so I do understand some of the commands. Any

Re: Using MySQL

2002-10-15 Thread Bruno Negrao - Perl List
I found this excelent article about this subject at: A Short Guide to DBI: http://www.perl.com/pub/a/1999/10/DBI.html bnegrao. - Original Message - From: Octavian Rasnita [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 1:27 AM Subject: Using MySQL Hi all,

Re: CGI simple but not working

2002-10-04 Thread Bruno Negrao - Perl List
Hi all, the problem is that the script is really erroneous. Where you read q(... should be p( ... The p() function is a part of the CGI.pm modules and stands for a new paragraph. the right script is: #!/usr/bin/perl -w # cgi-bin/ice_cream: program to answer *and generate* ice cream # favorite

Re: CGI simple but not working

2002-10-04 Thread Bruno Negrao - Perl List
No Richard, just in this script. The other cgi examples are correct. Is this the way it is printed in your book? Did they switch q and p all over the book? Bruno Negrao - Perl List [EMAIL PROTECTED] wrote in message 001e01c26ba7$4b219e00$5100a8c0@egp">news:001e01c26ba7$4b219e00$

CGI simple but not working

2002-10-03 Thread Bruno Negrao - Perl List
Hi all, I'm studying the Learning Perl Second Edition and I'm learning cgi now. The book presents a sample cgi that doesn't produces the expected result as the book says it would. In sumary, this script should generate an one field form with a default value - mint. But what appears in the screen

Help!! Retrieving Image File

2002-08-14 Thread Perl
or a text/html file, if not then download it. I made a simple code and its not working for the image file, I hope someone here in the list can help me. Here are the sample code that I've tried so far and it didn't work. Kindly please tell me what I missed Code 1: It didnt work... #!/usr/bin/perl

Re: real beginners stuff

2002-08-13 Thread perl-dvd
and then start this script in server_b which has the code in its cgi-bin folder #! /usr/bin/perl -w # use CGI qw(:standard); #use strict; # print END_of_file; Content-type: text/html html headtitleServer Environment/title/head body h2This server is:/h2brbr Server Name: $ENV{SERVER_NAME} Port Number

Re: Problem with the code

2002-08-12 Thread perl-dvd
$self-{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self-{_Email} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/ should be $self-{_Email} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $self-{_Email} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/ Regards,

Re: Post to a second CGI script

2002-07-31 Thread perl-dvd
number (USN). Here's the question: How to I post the LOGIN_USERNAME and USN to the MENU.CGI script? I don't want the user carrying the info around in the Location bar as ?USN=1234LOGIN_USERNAME=somebody -- I want it to be part of the user's Perl process if you know what I mean, so that if they hit

Re: malformed header from script???

2002-07-25 Thread perl-dvd
at it __ #!/usr/bin/perl -w use strict; use CGI; use XML::Twig; use Date::Calc qw( System_Clock ); use SendMail; #---path stuff - you need to set these to values appropriate to your system my $pathToAssignNum = /usr/local/httpd/htdocs

Re: HTTP_REFERER

2002-07-24 Thread perl-dvd
Shao-Ju, Yes, but it does not exist when there was no referer. So, for example, if somebody just went strait to test.pl, it would not have a referer, but if somebody went to test.html which had a link to test.pl, then you would have a referer which would be the url of test.html Regards,

Re: HTTP_REFERER

2002-07-24 Thread perl-dvd
Well, there you have it Shao-Ju. Hey, I learned something new today. Cool. - Original Message - From: Bob Showalter [EMAIL PROTECTED] To: 'Shao-Ju Chao' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 24, 2002 7:56 AM Subject: RE: HTTP_REFERER -Original

Re: Web tools

2002-07-23 Thread perl-dvd
- Original Message - From: Samuel Yip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 23, 2002 7:01 AM Subject: Web tools Hi, I am new to perl and would like to use perl to do the following: 1. Prompt the user for a IP address. 2. Ping the IP address from the web server and 3. Print

Re: Buffer output?

2002-07-22 Thread perl-dvd
Teddy, $|=1; is supposed to perl to print to standard out right away instead of buffer information. You see, by default Perl buffers what it is going to print out until the buffer is full, then prints. For some reason, when I use $|=1; It seems that the first output to STDOUT

Re: regex - problem

2002-07-22 Thread perl-dvd
Alex, Did you get the problem fixed? Yes it was because you did not escape your . when you wanted a . instead of an any character. ..[a-zA-Z]{2,3} will match .abc, but it will also match abcd but \.[a-zA-Z]{2,3} will require that the first character this part of the regular expression

Re: formate text sequence

2002-07-17 Thread perl-dvd
Konrad, Is this what your looking for? -- my $input = 'ABCDEFGHI'; my $output = $input; $output =~ s/(\w{3})/\p\$1\\/p\/g; print qq^\$input = $input\n^; print qq^\$output = $output\n^; -- To make

Re: Couple of newbie questions

2002-07-16 Thread perl-dvd
any errors including errors returned from perl. If you use tail -f /var/logs/error_log (of course replace that with where your error log is), you will be able to watch the log incase any errors pop up. This is very very useful while developing. Other methods tricks are print STDERR \$var

Re: Counting the time with fractions of a second. The solution!

2002-07-15 Thread perl-dvd
Teddy, Because times is a perl function, not necessarily a var. Here's what one of my perl books has to say about it: --- The times function returns the amount of job time consumed by this program and any child processes of this program

Re: Why Premature end of script headers?

2002-07-15 Thread perl-dvd
Probably your web server is timing out the request and killing your script. Web servers don't like to run long-running processes like this. Perhaps you can fork off a child and have the child take care of it. Another solution is to have something like the following in your loop:

Re: Why Premature end of script headers?

2002-07-15 Thread perl-dvd
Yes, your right. It seems to me there has got to be a more efficient way to accomplish what is being attempted. Right now, the solution is making a copy of the file, then checking every line of the original against every line of the copy. This method becomes exponentially more

Re: Executing cgi from perl script

2002-07-12 Thread perl-dvd
, July 11, 2002 4:40 PM Subject: Executing cgi from perl script Hi, I want to execute a cgi script from a perl script that first updates the cgi script. The basic code I'm using to open and update the file is: print Content-type: text/html\n\n; open RESULT, template.cgi; while (RESULT) { s

Re: What is this string type? How to play with?

2002-07-11 Thread perl-dvd
the first one ? Maybe I am still new to Perl... so I'm try to write my script to handle a form request like this ? Would you and the list comment on me ? ( except telling me to use CGI, because I won't use it unless I have to deal with multipart form =)) my %data = undef; my $input = undef; ($ENV

Re: What is this string type? How to play with?

2002-07-11 Thread perl-dvd
string ? .. Keep in mind, you may have multiple # values for the same name. Just hard to imagine how come a request coming with same name. Aren't we supposing the later come value with same name will overwrite the first one ? Maybe I am still new to Perl... so I'm try to write my

Re: Username Password Question

2002-07-08 Thread perl-dvd
When you have everything working, and something for security (htaccess), try redirecting by, NOT printing a content-type (text/html or whatever), then print this: print Location: http://www.domain.com/path/morepath/file.html\n\n;; The capitalization and space are very important.

Re: Form.pm

2002-07-03 Thread perl-dvd
to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http

Re: Including External Pages

2002-07-03 Thread perl-dvd
The reason I explained how to slurp the file into a variable was so that it could be printed anytime anywhere. My solution does not force the file contents to be printed right away. This is also useful for if you wish to replace something in the faq before printing it, or adding some to the

Re: Form.pm

2002-07-03 Thread perl-dvd
, 2002 11:46 AM Subject: Re: Form.pm perl-dvd wrote at Wed, 03 Jul 2002 19:22:49 +0200: Yes, my lines of code are long. For this I apologize. I work on 1600x1200 with Homesite which doesn't wrap lines unless I ask it to. You know, if you have the same circumstances as I do

Re: Form.pm

2002-07-03 Thread perl-dvd
I did not say that you said this. I did say that was the tone (or feeling created based on what was said). I knew you had mentioned the ; vs thing before. But at that time, I still did not have a solutions to replace it with. I understand the frustration of telling somebody

Re: Including External Pages

2002-07-03 Thread perl-dvd
loading the data in to memory. Sometimes there are other solutions that are better for other reasons. The point I was trying to make was how print() takes a list of data and not just a simple scalar, a key concept for new perl programmers to understand. It probably took me months to understand it. It h

Re: Form.pm

2002-07-03 Thread perl-dvd
in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com

Re: winlinux

2002-07-02 Thread perl-dvd
You of course have to pay for the full registration, but you can download the demo and try it out from here: http://labf.com/download/winaxe.html Regards. David - Original Message - From: [EMAIL PROTECTED] To: Martin Pestun [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July

Re: Printing the Content-type

2002-07-01 Thread perl-dvd
Look up the wget package for Linux. or you can try the combination of these: HTTP::Request; LWP::UserAgent; Regards, David - Original Message - From: Octavian Rasnita [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 28, 2002 6:25 AM Subject: Printing the Content-type

Re: Help! which are the correct parameters?

2002-07-01 Thread perl-dvd
my $stuff = qq^ here is some stuff and more stuff to boot stuff for me and stuff for you ^; $stuff =~ s/stuff/money/gs; # g says match all occurrences # s says treat $stuff as a single line Regards, David - Original Message - From: Octavian Rasnita [EMAIL PROTECTED] To: [EMAIL

Re: Including External Pages

2002-07-01 Thread perl-dvd
open(FH, /usr/www/domain/faq.txt); # for read, for write, for append local $/ = undef; # slurp mode (allow for shoving the whole file into a scalar) my $faq = FH; # slurp the whole file into this scalar. close(FH); - Original Message - From: Kyle Babich [EMAIL PROTECTED] To:

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-07-01 Thread perl-dvd
then. Thanks, David David, Just a reminder regarding posting your alternative to CGI.pm (and thanks to niko for reminding me to remind you :) Cheers, Curtis Ovid Poe = Ovid on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack

Form.pm

2002-07-01 Thread perl-dvd
Well, I'm a little bit behind schedule because the home page for Form.pm just got erased (long story). Anyway, I just setup a backup system on my server now so I'll have a weeks worth of daily backup's (ya, I know I should have had this before). But attached are the main functions of

mod_perl SQL

2002-06-28 Thread eric-perl
Hello, All: Can anyone recommend a good introductory-level tutorial on writing mod_perl modules that interface with SQL? -- Eric P. Los Gatos, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd
The difference is, the efficiency and data structure CGI.pm returns. Mine came to I think 72 times faster when not uploading images, and 2.5 times faster when uploading images. I'm not saying CGI.pm is written poorly or anything, I am saying that it is a little bit bloated and has a lot

Re: Displaying Problems

2002-06-27 Thread perl-dvd
You make a very good point fliptop, I did forget the nature of this mailing list. As far as CGI.pm debating, I will step down in this mailing list. David - Original Message - From: fliptop [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Bob Showalter [EMAIL PROTECTED]; [EMAIL PROTECTED]

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd
my point stands :) So out of curiosity, what kind of data structure do you get back with this? If its as I would imagine, then its very close to my own. %hash = ( 'a_name' = 'value', # for single name value pairs 'b_name' = [multiple, values, for, this], # for single name

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd
by the way, :) is a smiley, it means I'm joking with you. (reference the last email) With mine, there is nothing beyond what I described. The hash structure I gave you below, that's it. Form.pm takes the input, makes a hash with it, and if you understand how to use a hash and array ref, your

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd
Cardinal Virtues! So this seems to me to be a properly Perl-ish attitude. - John --- [EMAIL PROTECTED] wrote: ... minded here, I'm just the type of person who if I'm not perfectly happy with the way something works (whether programming or in the real world), I determine whether I can fix it, if I

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd
Subject: Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems After all, Hubris is one of St. Larry's Three Cardinal Virtues! So this seems to me to be a properly Perl-ish attitude. - John = Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still alive

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread perl-dvd
-- my $var = (801) 555-; # ya, ok so I'm in utah :) $var =~ /(\(\d+\))/; # real paren, escape paren, \d = digits, # + = one or more, escape paren, real paren my $area_code = $1; # set to what came from between the real parens

Re: Displaying Problems

2002-06-26 Thread eric-perl
) will execute the script. 3. Is the filename-extension correct to enable the server to recognize it as executable? (e.g., '.cgi' vs '.pl') 4. Did you tell the OS how to execute this script? (e.g., #!/usr/bin/perl) -- Eric P. Los Gatos, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Displaying Problems

2002-06-25 Thread perl-dvd
- From: Kyle Babich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 24, 2002 2:09 PM Subject: Displaying Problems For the following the syntax is correct but when I try to open it nothing displays, what should I change? #!/usr/bin/perl -wT use strict; use CGI::Pretty qw/ :standard /; $CGI

Re: Displaying Problems

2002-06-25 Thread perl-dvd
Bob, I fail to see how writing code with errors is somehow CGI.pm's fault No its not. But I'll tell you one thing, people who depend so heavily on CGI.pm generally have a good understanding of how to use CGI.pm, but have less understanding of what is really going on. Me personally, I want

Re: Displaying Problems

2002-06-25 Thread perl-dvd
Bob, CGI.pm--a threat to our way of life! Down with the troglodytes! :) Well, not exactly my point, but ok :) Just kidding I just think there are too many who close their minds to anything but CGI.pm, including potentially more efficient customized solutions. David - Original Message

Re: Displaying Problems

2002-06-25 Thread perl-dvd
Bob, That's interesting. You know, I work with about 5 other perl programmers, most of which do use CGI.pm, but none of them use it for anything other that gathering input from the web. I have also downloaded many packages from CPAN, I would say a majority of them use CGI.pm, but very

Re: Renaming files

2002-06-25 Thread learn perl
use this: you could use system commands if you are on winnt or w2k. I normally just use @filelist = `dir *.ext /b`; foreach (@filelist){ @filename=split on the . if last element of @filename is what you're looking for{ `rename $_ @filename[0].newext` }

Re: calling sub based on database list?

2002-06-24 Thread perl-dvd
based on database list? Ok, I got sorta a hard questionI think that involves calling randomly changing subrutines. What I'm Trying to do is this. 5 libaries are required into my CGI(PERL) program Each of them has their own set of subrutines. Now when someone accesses my site they also send a page

Re: return =1

2002-06-24 Thread perl-dvd
Octavian, Secondly, by your explanation, I'm not sure whether you know this, but your if should be like this: -- my $test = sub_name(); if ($test){ # stuff } -- Or -- if (sub_name()){ # stuff }

Re: text problem

2002-06-24 Thread perl-dvd
Martin, Well, you can use a simple html tag called pre. --- open(FILE, /path/file); local $/ = undef; # slurp mode, pull all data coming in one shot (so it all goes into a scalar) $contents_of_file = FILE; close(FILE); print qq^ pre $contents_of_file

Re: PERL!! : )

2002-06-21 Thread perl-dvd
- From: Bill Odom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 20, 2002 2:00 PM Subject: Re: PERL!! : ) JP: While I agree with Brent (hi, Brent), it doesn't have to be an all-or-nothing decision. I've had a lot of success running Perl

Re: CGI.pm

2002-06-21 Thread perl-dvd
The template replacement I cant give because I wasn't the one who wrote it, but Form.pm is my CGI.pm replacement for receiving data. I wrote it approximately 2 1/2 years ago and have been tweaking and improving it since. I'll release it to C-PAN within the next month I think, look for

Re: Send mail question

2002-05-17 Thread eric-perl
On Fri, 10 May 2002, fliptop wrote: Lance Prais wrote: If I am going to sendmail from an Internet using CGI does anyone know all the modules I will need to install? This may answer all my questions. i use mime::lite and it works great and is simple to use. Ditto. -- Eric P. Los Gatos,

Adding comments causes fatal error -- really strange

2002-04-10 Thread perl
some comment lines (yes, plain Perl comments without even any code fragment in them) and my module got to work as if nothing happened. I've experimented a little with comments and blank lines - the same problem, looks as if there is a line limit, which I cannot believe. I am not running mod_perl nor

Re: apple and oranges

2002-03-07 Thread eric-perl
On Wed, 6 Mar 2002, Fred Sahakian wrote: Im taking in data through a Perl Script with the following conversion: $value = ~s/Apple/Orange/g; This is fine for new data, but each time the program is run it's taking all the data being entered and turning the apples into oranges, any ideas

Re: Escaping special characters for regular expressions

2002-02-28 Thread eric-perl
On Wed, 27 Feb 2002, W P wrote: I have a CGI script which takes two strings. It searches for the first string in a file, replacing it with the second one. This file isn't really important, more for fun, so I'm not too worried about people deleting the whole file if they actually type out

Re: Is it a problem?

2002-02-27 Thread eric-perl
On Wed, 27 Feb 2002, Octavian Rasnita wrote: Hi all, I am new in Perl world, and I saw many messages telling that it is a security problem is someone can download the passwd file from a Unix machine. I have 2 questions: 1. As far as I know, that file has the passwords crypted

Re: Uploading a file

2002-02-27 Thread eric-perl
On Wed, 27 Feb 2002, Octavian Rasnita wrote: I saw a question about how to make a Perl script for uploading a file and I didn't see any answer for it. I am also interested in this thing. Could somebody give us some hints? Or, give us a source for a Perl script for uploading a file

Re: Session cookies

2002-02-27 Thread eric-perl
On Wed, 27 Feb 2002, Octavian Rasnita wrote: I want to set a cookie in a Perl script only for the current session, and I don't need that cookie after the visitor closes the browser. Can I use this kind of cookie if the user has deactivated cookies in her browser? I can't test this on my

Re: Things that make you go hmmmmmmmm

2002-02-26 Thread eric-perl
On Tue, 26 Feb 2002, Scot Robnett wrote: What typically causes the following type of error in a CGI? --- Use of uninitialized value in concatenation (.) at D:\inetpub\whatever\census\myscript.cgi line 272.

Get stuck when using modules

2001-12-15 Thread Perl Beginner
Hi all, I am using Windows 98 and active perl , and now I have 2 problems here : Q1) I am trying to use CGI module to output a GIF, but I found that it is fail . However, my purpose is to output multiple GIFs, just something looks like a counter. Would anybody have suggestion for a better

RE: Perl script to monitor sendmail

2001-08-29 Thread perl-cgi
I am having problems with this. For some reason the script connects even though nothing is listening on that port. ie. If I shut down the smtp server I can no longer 'telnet hostname 25' so the script should die, but it doesn't. Here is what I have: #!/usr/local/bin/perl -w use IO::Socket

RE: Perl script to monitor sendmail

2001-08-29 Thread perl-cgi
Just some more info: If I use the orignal Socket library and build the connection by hand, it behaves as normal: #!/usr/local/bin/perl -w use Socket; $remote_host= 85.3.25.115; $remote_port= 25; socket(TO_SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')); $internet_addr

Perl script to monitor sendmail

2001-08-28 Thread perl-cgi
sample code that would allow a perl script hosted on a Unix machine periodically connect to the mail port and determine if it is up or not. Thanks, CC -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Writing to a text file

2001-06-22 Thread perl
its most likely because the web server is running as nobody and the file is owned by your user. you can make the file writable to everyone by type : chmod goa+rwx filename or to be safe you can install SuExec on apache, it will execute the cgis as the user who owns them.. Ryan On Fri, 22 Jun