matching regardless of case
I have written a basic search engine, but can not find how to match the users input regardless of case. #$keyword comes from html form input while (htmlfile) { if (/$keyword/) { #do some things here } } Any help is always appreciated, many thanks, Chris. _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ignore my case question
Sorry about that! I was looking in the wrong place for the info, found it just after I posted the question, many thanks anyway, Chris. _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
searching files
Hello everyone, I have a bunch of folders that I would like to search through for a particular string. Any hints on how to do this? I do not know the names of all the files, but would like to be able to return the name. Basically this is so I can search a bunch of files for a word, and be able to tell which files the word occurs in. Thanks as always, Chris. _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File question
Hi everyone, Is there a way to open a file in a folder/s above/below the one the script is in? (OS is win2k), Thanks, Chris. _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
substitution
Hi everyon, thanks for your help so far I am trying to substitute a path for another path. I have html documents which refer to some images in the following directory: C:\Documents and Settings\chrisz\Desktop\Web_notes\PFLogo.gif I would like to change this so it reads: .../PFLogo.gif I have tried the following substitution: $rplcthis = C:\\Documents and Settings\\chrisz\\Desktop\\Web_notes; $with = ..; $line =~ s/$rplcthis/$with/g; But it does not seem to work. Through testing, I think that it is the '\' character that it does not like in the regex? Any help would be really great, Thanks, Chris. _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sending Mail
Bhanu, Not sure what operating system you are using, but I have just done something very similar in Windows. The form the user input data into was on their intranet, and then the details of the form were mailed out to the client (in html orginally, but my clients are large insurance firms and did not accept html content - silly me!!), If you think that I can be any help, just let me know, Chris Zampese. [EMAIL PROTECTED] - Original Message - From: Johannes Franken [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 21, 2002 9:38 PM Subject: Re: Sending Mail On Wed, Feb 20, 2002 at 08:58:41AM -0800, Bhanu Prakash wrote: when a user submits a form, the input entered by him should be mailed to the address he specifies in one of teh input fileds.! If you put that one on a public webserver, you should consider a way to prevent bad people from using it as spam relay. can anybody give me some bare bone structure of how I should accomplish this? For example, you could use Net::SMTP #!/usr/bin/perl -w # # sendmail.pl - httpd - smtp gateway # # use CGI; use Net::SMTP; # defines $from=httpd\@jfranken.de; $mailhost=localhost; # Get CGI- query params $q =new CGI; $subject=$q-param(subject); $text =$q-param(text); $to =$q-param(to); die unless ($subject and $text and $to); # SMTP (RFC 821) -Header $smtp = Net::SMTP-new($mailhost) or die; $smtp-mail($from) or die; $smtp-to($to) or die; # Mail (RFC822) -Header $smtp-data() or die; $smtp-datasend(From: $from\n) or die; $smtp-datasend(To: $to\n) or die; $smtp-datasend(Subject: $subject\n) or die; # Mail (RFC822) -Body $smtp-datasend(\n$text\n) or die; $smtp-dataend() or die; $smtp-quit or die; # HTML Feedback to the user print Content-Type: text/html\n\nhtmlbody bgcolor=\#ff\Your message was sentpa href=\ . $ENV{HTTP_REFERER} . \continue/A/body/html; exit -- Johannes Franken Professional unix/network development mailto:[EMAIL PROTECTED] http://www.jfranken.de/ -- 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]
help with html
This question probably belongs in the cgi list, but here goes... I know that this is going to sound bad, but I want to send an html document via email to people that have blocked html (I am doing a form for an insurance broker, and it goes to the insurance companies that they deal with. The insurance companies have blocks on html) is there any way around this problem (other than calling each insurance company and getting them to change their settings, this is a problem as some of them are controlled by a 'head office' arrangement). The main thing that I want this for is the ability to set the subject line of a reply, so if anyone knows how to do this another way that would work also, thanks for your time, Chris.
Re: help with html
you're right. it does sound bad. someone call spam cop :-) -- Honestly, no spam. Just want to automate the office a bit. Changed a form that they usually send by paper (fax or snail mail) to an email form. -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 11:49 To: perl list Subject: help with html This question probably belongs in the cgi list, but here goes... I know that this is going to sound bad, but I want to send an html document via email to people that have blocked html (I am doing a form for an insurance broker, and it goes to the insurance companies that they deal with. The insurance companies have blocks on html) is there any way around this problem (other than calling each insurance company and getting them to change their settings, this is a problem as some of them are controlled by a 'head office' arrangement). The main thing that I want this for is the ability to set the subject line of a reply, so if anyone knows how to do this another way that would work also, thanks for your time, Chris. -- 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]
getting a block of text from file
Hi All, I have a file that contains the contents of an email. Its format is shown below... (Lots of lines of random stuff) Content-Transfer-Encoding: quoted-printable The message of the email is here then it is followed by --=_NextPart_000_0118_01C1B358.DE107900 (lots more lines of stuff) how would I get just the message into a variable (or array or whatever) so that I can use it?
substitute
Hi all, me again! I have a variable (mymessage) that contains alot of text, plus some $scalar variables... A bit like this. my $mymessage= 'blah blah blah $myblah with a bit of $moreblah' ; then I would like to process this so I can use it as the body of an email. Like this. $mymessage =~ s/(\$\w+)/$1/eeg; This works great and I can continue with sending the email etc, but some of my $scalars are all digits, and the above regex does not change them correctly. I have looked in the perl manpages, but I can only see how to do one or the other, Anyone have any ideas?? Thanks as always, Chris.
Net::Smtp help!
can anyone tell me who my subject line is not appearing when I use the following code, everything else works except that! I am on a Win98 system and all $variables are gathered from a form, as I said, all the other details appear except the subject. #!C:\Perl\bin\perl.exe -w #By Chris Zampese use strict; use CGI ':standard'; use Net::SMTP; use LWP::Simple; $server = 'smtp.slingshot.co.nz'; $from= $name; $to= $email$email2; $subject= 'Ford Butchart Urwin Placing Slip'; $body=$mymessage; $objMail=Net::SMTP-new($server); $objMail-mail($from); $objMail-to($to); $objMail-data(); $objMail-datasend(MIME-Version: 1.0\n); $objMail-datasend(Content-type: text/html;); $objMail-datasend(Subject: $subject\n); $objMail-datasend(To: $to\n); $objMail-datasend(From: $from\n); $objMail-datasend(\n); $objMail-datasend($body); $objMail-dataend(); $objMail-quit; Many thanks, Chris
Re: substitute
I found my problem, I was using a _ between my $variables to create a string, changed them to commas and everything is great! - Original Message - From: Chris Zampese [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 10:52 PM Subject: substitute Hi all, me again! I have a variable (mymessage) that contains alot of text, plus some $scalar variables... A bit like this. my $mymessage= 'blah blah blah $myblah with a bit of $moreblah' ; then I would like to process this so I can use it as the body of an email. Like this. $mymessage =~ s/(\$\w+)/$1/eeg; This works great and I can continue with sending the email etc, but some of my $scalars are all digits, and the above regex does not change them correctly. I have looked in the perl manpages, but I can only see how to do one or the other, Anyone have any ideas?? Thanks as always, Chris. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
array question
Hi all, Just wondering if someone could direct me in the right direction... I am trying to find the number of elements in an array?? any clues gratefully accepted. thanks as always, Chris.
Re: Complete Beginner Looking for Advise!
I have read through all of the messages on this subject, very interesting. I am new to perl and at the University that I went to they used C++ as the base for teaching programming. I thought that I would put in my 2 cents worth as a different perspective. I think that C++ gave me alot of grounding to 'think like a programmer'. I learnt how to think around problems logically. I also think that all languages encourage this sort of thought process, and IMHO that is one of the most important things to learn. I would have to agree that Perl making certain things easier for beginners should be called progress. I have learnt Perl from home, with no other resources except the Internet (some of you who have answered my questions might have noticed this!!, sorry, Im a poor student, no money for books, and local librarys in my part of the world dont seem to support the local programmers much) and the one trap that I find myself falling into is creating messy code, but as Jenda said, make us beginners go back and change our code every now and then and we will soon learn. Perl seems to be one of the more readable and sensible languages that I have used, Anywho, just thought I would have my say :) Chris. - Original Message - From: Dave Benware [EMAIL PROTECTED] To: Beginners perl [EMAIL PROTECTED] Sent: Monday, February 11, 2002 10:44 AM Subject: Re: Complete Beginner Looking for Advise! There are a few Perl tutors around who might have a different perspective, but from my point of view, turn on strictures and warnings, exercise a little self control and Perl can allow you to produce clear, concise, extensible and maintainable code. What more could a beginner want? I think Jenda mentioned something about readability as you do with clear. What I find interesting about that is that folks that have been coding Perl for some years take so many shortcuts in their code that it's difficult for a beginner, (or as least for this beginner), to understand. By shortcuts, I mean not using the $_ or ommitting the binding operator for a regex. That sort of thing confuses me because it looks so different from what I study in my books. I understand *why* they do it and I'm sure they feel that the newbies should just catch up, but...oh well... Bompa's 3 cents -- 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]
rename a file in win98
Just wondering if anyone has any bright ideas on how to rename a file in Win98. I have tried the following... my $old=C:/sentslips/sentslipstemp.txt; my $new=C:/sentslips/sentslips1.txt; rename($old, $new); But no luck, the sctipt runs without errors (I am running with the -w switch and use strict) Thanks for your help, Chris
Re: rename a file in win98
- Original Message - From: Chris Zampese [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 12:57 AM Subject: rename a file in win98 Just wondering if anyone has any bright ideas on how to rename a file in Win98. I have tried the following... my $old=C:/sentslips/sentslipstemp.txt; my $new=C:/sentslips/sentslips1.txt; rename($old, $new); But no luck, the sctipt runs without errors (I am running with the -w switch and use strict) Thanks for your help, Chris I have also tried using File::Copy but it doesnt copy the last line of the file. My file is created by printing single lines into a text file as follows open($MYFILE1, + C:/sentslips/sentslipstemp.txt) || die can't open C:/sentslips/sentslipstemp.txt; print {$MYFILE1} $filename?$date\n; close (MYFILE1); This is inside a loop, so I end up with a file with (at the moment) 2-4 lines like so... Placing_Slip___This is the first?09-02-2002 Placing_Slip___This is the second?09-02-2002 but when I copy or move the file like this... copy(C:/sentslips/sentslipstemp.txt,C:/sentslips/sentslips1.txt); the new file would have one less line, any help would be hugely appreciated. Thanks again -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: rename a file in win98
- Original Message - From: John W. Krahn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 10:03 AM Subject: Re: rename a file in win98 I have also tried using File::Copy but it doesnt copy the last line of the file. My file is created by printing single lines into a text file as follows open($MYFILE1, + C:/sentslips/sentslipstemp.txt) || die can't open C:/sentslips/sentslipstemp.txt; print {$MYFILE1} $filename?$date\n; close (MYFILE1); This is inside a loop, so I end up with a file with (at the moment) 2-4 lines like so... Placing_Slip___This is the first?09-02-2002 Placing_Slip___This is the second?09-02-2002 but when I copy or move the file like this... copy(C:/sentslips/sentslipstemp.txt,C:/sentslips/sentslips1.txt); the new file would have one less line, any help would be hugely appreciated. Thanks again use File::Copy; open OLD, $old or die Cannot open '$old' $!; binmode OLD; open NEW, $new or die Cannot open '$new' $!; binmode NEW; copy( \*OLD, \*NEW ) or die Cannot copy '$old' to '$new' $!; Thanks John, This worked the first time, but when I tried it again, it copied one less line than it should?? Could it be something to do with newlines or eof or something?? Very confused! Thanks for your help, it sure keeps me sane! Chris. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting mail with Perl
Try the Mail::Pop3Client. It is available from CPAN I think. You should be able to use this to get your messages. The following code is used to print the headers of all your emails. This is straight from example code on the Mail::Pop3Client site (cant remember the address sorry, but just tytype Mail::Pop3Client into google, and you should have alot of luck). use Mail::POP3Client; $pop = new Mail::POP3Client( USER = USERNAME, PASSWORD = PASSWORD, HOST = SERVERNAME ); for( $i = 1; $i = $pop-Count(); $i++ ) { foreach( $pop-Head( $i ) ) { /^(From|Subject):\s+/i print $_, \n; } } $pop-Close(); Chris. - Original Message - From: Jerry Preston [EMAIL PROTECTED] To: begginners [EMAIL PROTECTED] Sent: Saturday, February 09, 2002 4:36 AM Subject: Getting mail with Perl Hi, I what to be able to check and read mail, is this possible with PERL? If so, what, where do I need to look, read and learn? Thanks, Jerry -- 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]
quick POP3 question
Hello again, I love you guys, really I do!! (shameless greasing, but also true appreciation!) I have the Mail::Pop3Client module installed. I have it running with the debug option on, and it appears to me that the server (pop3.xtra.co.nz) is accepting the user and password that I send (it says OK please send PASS command, then OK /USER? is welcome). But it never shows that there are messages in my Inbox?? Possible points of interest... I am using Windows 98. I am connected to a network, so there are several people with email addresses that end in the same thing. The documentation that I recieved from my ISP says that the above server (with the relevant USER and PASSWORD) is a wildcard collect for @companyname.co.nz I have an email address ([EMAIL PROTECTED]) and I would assume that messages to me would be picked up by this 'wildcard' collect, but it doesnt appear to work at all??? Sorry that this is huge, but I am getting a little desperate as I have been working on this for a wee while now, Thanks for all the time and effort that is put into the list. Give me a hundred years and I might be able to answer some questions myself! Chris
Re: Comparing strings
dont know if this helps, but the following code $one = ExamPle; $two = example; if ($one=~/$two/i) { print true ; } print false; outputs: true false (ie evaluates the expression in the curly braces) and if you change the top word to ExanPle (change the m to n) then it only outputs: false Hope that is of some help :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Comparing strings
me again :) Just realised that I did not give you an explanation of why this works... The expression is a simple regex (see Perl Documentation). The =~ is sort of the 'equal to' part, and the i at the end makes the comparison case insensitive. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quick POP3 question
thanks for the advice, but I think that it is a problem with the way the network is set up as I am running that exact code (straight from the documentation). Cheers anyway :) this was in reply to... I have the Mail::Pop3Client module installed. I have it running with the debug option on, and it appears to me that the server (pop3.xtra.co.nz) is accepting the user and password that I send (it says OK please send PASS command, then OK /USER? is welcome). But it never shows that there are messages in my Inbox?? That's not the way POP works. After you login (USER is welcome here) it doesn't tell you anything. You have to ask for the info you want. In this case, I just think you have to call the Count method of your POP3Client object, then you'll know how many messages are there. Take a look at the example code in the documentation for Mail::POP3Client. use Mail::POP3Client; $pop = new Mail::POP3Client( USER = me, PASSWORD = mypassword, HOST = pop3.do.main ); for ($i = 1; $i = $pop-Count(); $i++) { foreach ( $pop-Head( $i ) ) { /^(From|Subject):\s+/i and print $_, \n; } print \n; } The Count method is called in the for statement, and tells the loop how many times it has to cycle to process all of the messages. Then the Head method returns a list of lines that the foreach cycles over, using the regular expression there to print out the From and Subject headers of each message. Try running this little chunk of code yourself, and I think you'll find it very illustrative. _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
simple file question
Hello everyone, I have a variable $myvar (an email address), and I would like to open a simple text file which contains email addresses (one on each line) and check to see if the address in $myvar is in there, if it is not, then append it o the end of the file, and if it is, then close the file and carry on with the rest of the script. I have tried using while (FILEHANDLE){}, but I am not really sure what to put in the brackets? Thanks as always, Chris.
Re: simple file question
Just found a regex in the docs. I now have this... while (FILE2) { print if /$email2/o; } but I am still not sure how to print to the file?? - Original Message - From: Chris Zampese [EMAIL PROTECTED] To: perl list [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 3:10 PM Subject: simple file question Hello everyone, I have a variable $myvar (an email address), and I would like to open a simple text file which contains email addresses (one on each line) and check to see if the address in $myvar is in there, if it is not, then append it o the end of the file, and if it is, then close the file and carry on with the rest of the script. I have tried using while (FILEHANDLE){}, but I am not really sure what to put in the brackets? Thanks as always, Chris. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail POP3::Client ??
Greetings and salutations to you all, Trying to get POP3 to work. I have a program that should get all the headers and subjects from the pop3 server, but it displays none, and if I put a check in to see how many messages there are it says there are none, despite me having sent myself some to test it!! I am working through a network, so my ISP has given me a name and password for wildcard collection on fbu.co.nz. There are about 10 users that have email ending in this. I have no idea what I am doing wrong and as always any help would be greatfully accepted, Thanks, Chris. use Mail::POP3Client; use strict; my $pop = new Mail::POP3Client( HOST = 'Pop3.xtra.co.nz', USER = 'AButchart', PASSWORD = 'broker1', DEBUG=1 ); $pop-Connect(); for( my $i = 1; $i = $pop-Count(); $i++ ) { foreach( $pop-Head( $i ) ) { /^(From|Subject):\s+/i print $_, \n; } } $pop-Close();
Win32::OLE, or maybe POP3Client Module??
Hello everyone! I am still trying to read the subject line of all messages in my Outlook Express Inbox. I know that this is possible using VB SCript - microsoft provides comprehensive tutorials in their suppport pages, but I cannot seem to get it to run in Perl. I thought that maybe it would be possible to capture the email straight from the POP server, Anyone know whether this is possible??? Once again I am extremely grateful and indebted to you all for any help, Thanks, Chris. _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
finishing a script
Hi All, Just needing help regarding ending a script properly. I have a script which I use basically to send an email consisting of the data entered in a form. The start looks like this.. #!f:\intranet\cgi-bin\bin\perl.exe -w use CGI ':standard'; use Net::SMTP; Then I use... $objMail=Net::SMTP-new($server); with all its additions to send the mail. The script is called when the user hits the submit button. This works fine, and the email is sent, but it doesnt seem to finish, so the form page sits waiting, so I cant have an onUnload javascript event to make a thank you page. Sorry about the long message, Thanks for all your help (both past and future!) Chris.
how do I load a new page?
Hi everyone, I am running a script on an Intranet. It is called when the submit button of a form is clicked. It takes all the items in the form, puts them into a different form, and emails that form away. This all works, but I get a server error page after I hit the submit button. Any ideas how I can change this? It could be a javascript question?? thanks in advance, CHris
Re: quick regex question
I tried the double brackets, but no luck :( Here is the code I use for my NET::SMTP, it seems to work OK for me using Windows 98. $server = '192.168.68.1'; #server name or ip address $from= $INPUT{name}$INPUT{atsign}fbu-brokers.co.nz; #just an email #address, but I get mine from the form $to= $INPUT{email}; #also just an email address $subject= 'test'; $body=$mymessage; #any string here, I have HTML in mine which is why I #have the MIME-Version and Content-type below. $objMail=Net::SMTP-new($server); $objMail-mail($from); $objMail-to($to); $objMail-data(); $objMail-datasend(MIME-Version: 1.0\n); $objMail-datasend(Content-type: text/html;); $objMail-datasend(Subject: $subject\n); $objMail-datasend(To: $to\n); $objMail-datasend(From: $from\n); $objMail-datasend(\n); $objMail-datasend($body); $objMail-dataend(); $objMail-quit; Hope it works for you, Chris. {$INPUT{field_name}}? wonder if that would work. It is supposed to evaluate what's inside the curly braces first. If it doesn't, then just turn them into simple variables and use the simple variable instead. $field_name = $INPUT{field_name}; I'd sure love to see a working example of NET::SMTP, not that you have to, but I'm sure I would use it. Gary -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 4:43 PM To: perl list Subject: quick regex question I have a program that takes input from a form, splits it and saves the values in an array - $INPUT{field} I then create a NET::SMTP mail instance, and message is a string ($mymessage) in which I have inserted the form values. This is so that I can create a form which when submitted will send another form with part of the data in its fields. So my $mymessage looks like this (but alot longer)... $mymessage='HTMLHEAD/HEADBODY form name =formname BR input type = text name=whatever value=$INPUT{field_name} etc then I want to pass the string through a regex so that it will espand all the $INPUT{field_name} occurances. I found a regex in the perldocs that will expand a variable -#$mymessage =~ s/(\$\w+)/$1/eeg; but it does not expand the {field_name}, so all I get in my emailed form boxes is {field_name}. Some help would be greatly appreciated, sorry that this email is so long, but it took me a long time to get to the point that the form would mail correctly etc, so I am quite excited about getting the details fixed, Thanks heaps in advance, Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Perl mail Program
Hi im looking for a simple perl mail program source code , program that takes your input and ask you for the address , etc,, and mail you the info to an address. Thanx 4 ur help. If the mail that you intend to get/send is not going to be too long (ie short messages) try some javascript. Some good email scripts available at http://javascript.internet.com. If you are really wanting to use perl (and who would blame you!) post your OS (windows/Unix/Solaris etc) as this can affect the programs you can use. Chris
Global Symbols
Hi everyone, I am running a perl script through an Apache server, and the error log is showing Global symbol $whatever requires explicit package name for all my variables (Globals and locals), any ideas, Thanks in advance, Chris.
Calling a subroutine
How do I call a subroutine in a cgi script. I thought that it was just subroutine_name(); but that does not seem to be working for me? You guys are great. Thanks for your help (both from answering my questions, and from answering other peoples!) Chris
trouble with curly brackets
When I execute the folowing script (to insert form input into $In), I get an error message saying unmatched right curly bracket line 60 at end of line syntax error near } Line 60 But I have been through the code over and over, and as far as I can see, all the brackets match up?? Can anyone with a fresh pair of eyes see where I am going wrong?? sub Parse { my $buffer; if($ENV{REQUEST_METHOD}eq'GET') {$buffer=$ENV{QUERY_STRING};} else {read(STDIN,$buffer,$ENV{CONTENT_LENGTH});} my @p = split(//,$buffer); foreach(@p) { $_=~tr/+//; my ($n,$v)=split(/=/,$_,2); $n=~s/%([a-fA-F0-9][a-fA-F0-9])/pack(C,hex($1))/eg; $v=~s/%([a-fA-F0-9][a-fA-F0-9])/pack(C,hex($1))/eg; $v=~s/(\.*?)(embed|object|script|applet)(.*?\)/$1$3/gis; if($In{$n}) {$In{$n}.=\t$v;} else {$In{$n}=$v;} } } #sub Parse This is only some of the code, the subroutine Parse () is called at the top of the script, Thanks
Cgi scripts not running...
Hello all, I am working within a small network (10 computers). I am trying to create a form that people can access through the f: (global drive). They will fill in this form, and the results will be processed by my script, and emailed to me. I have installed activeperl in the f drivebut I cannot seem to get any scripts to run in the intranet...any suggestions? We are running Netware 4.11 as the server. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cant run CGI Scripts?
Sorry for the 'newbie' question, but I am going bald from pulling my hair out, so I had to ask some people with brains... I am trying to run a CGI script on an Intranet. Basically the user opens a form in the intranet and when they submit it a modified copy (ie slightly different layout) is sent to someone (offsite) and the info in the form is saved to a text file. I have written all the code, but I cannot get the script to run on the intranet. I am running Perl 5.6 form activestate, and the Intranet is being handled with Novell Netware. I have been asked if it is a file server or a web server...not really sure, but the address of the Intranet home page is 192.168.68.1 (seems web-ish to me?). If anyone has experience running CGI on an Intranet I would really appreciate some help. Thanks in advance for your help, and in retreat for all the help that I have found from previous posts on this list :) Chris