Concatenating names from form
I want to be able to read in names from a web-based form and then take the first initial from the first name and concatenate it with the whole last name. I can do everything except isolate the first initial in the first name. Anyone know of an easy way to do this with a regex or reading the name into an array as individual characters and then using something like: $first_initial = $name[0]; Thanks, Paul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concatenating names from form
So what's your input ? and you's your supposed output ? regards, Connie in sick _ - Original Message - From: Paul Arsenault [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 04, 2002 7:48 AM Subject: Concatenating names from form I want to be able to read in names from a web-based form and then take the first initial from the first name and concatenate it with the whole last name. I can do everything except isolate the first initial in the first name. Anyone know of an easy way to do this with a regex or reading the name into an array as individual characters and then using something like: $first_initial = $name[0]; Thanks, Paul -- 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]
Check Mail then Fax
Hi all, This is a mess now... I even have no concept on how to start. I will working on something like this There are 2 interface as input. One is a Web interface, which will accept HTML tag and plain text by POST method, but by GET method, the input would be an URL. Another One is a mail box, like [EMAIL PROTECTED], maybe that's not really an interface, just a input channel. So, there are 3 sources will be needed to handle. GET, POST and Mail box. Then , whatever GET, POST, or Detected mail arrival, they will write into a log for waiting handle. What the meaning of handle is to FAX it out. === Problems : Q1) For Get method, How can I get the whole content of an URL ( including image and html layout ) and save it to my temp directory ? Q2) For Detecting mail arrival, I can do this. But how can I fetch those attachment data (Excel, Word) and dump to my printer driver (actually WinFax) ? Q3) How can I detect how many attachment(s) in a mail ? Because I would like to treat no attachment and attached more then 1 file as error. Q4) Refer to Q2, should I firstly split the attachemt file to a temp folder at first ? If so, how can I PICK UP the attachment from the mail ? === Any advice, module recommend, are very welcome. Thanks a lot, Connie in sick _''
What could go wrong with closing an FH ?
Hi All, After a couple of emails about opening a file with a lower case FH, I have a question. I see everyone opening a file with an or die statement, what I can fully understand. But I see you also close the FH with an or die statement. Why ? What can go wrong with closing an FH ? Can anyone tell me the answer ? I am much interested. Regs David Ok, thank you, but now I'm having another problem with this: open(TEXT,text.txt) or die (error: text.txt failed\n); while (TEXT) { my $text = TEXT; } close(TEXT) or die(error: close text.txt failed\n); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concatenating names from form
on Wed, 03 Jul 2002 23:48:37 GMT, Paul Arsenault wrote: I can do everything except isolate the first initial in the first name. Anyone know of an easy way to do this my $firstname = 'Paul'; my $initial = substr($firstname, 0, 1); See perldoc -f substr -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Concatenating names from form
Thanks Felix, This is exactly what I was looking for! Paul From: Felix Geerinckx [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Concatenating names from form Date: 4 Jul 2002 10:37:33 - on Wed, 03 Jul 2002 23:48:37 GMT, Paul Arsenault wrote: I can do everything except isolate the first initial in the first name. Anyone know of an easy way to do this my $firstname = 'Paul'; my $initial = substr($firstname, 0, 1); See perldoc -f substr -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Weekly list FAQ posting
NAME beginners-faq - FAQ for the beginners-cgi mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to [EMAIL PROTECTED] You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address): [EMAIL PROTECTED]. 1.2 - How do I unsubscribe? Now, why would you want to do that? Send mail to [EMAIL PROTECTED], and wait for a response. Once you reply to the response, you'll be unsubscribed. If that doesn't work, find the email address which you are subscribed from and send an email like the following (let's assume your email is [EMAIL PROTECTED]): [EMAIL PROTECTED] 1.3 - There is too much traffic on this list. Is there a digest? Yes. To subscribe to the digest version of this list send an email to: [EMAIL PROTECTED] To unsubscribe from the digest, send an email to: [EMAIL PROTECTED] 1.4 - Is there an archive on the web? Yes, there is. It is located at: http://archive.develooper.com/beginners-cgi%40perl.org/ 1.5 - How can I get this FAQ? This document will be emailed to the list once a month, and will be available online in the archives, and at http://beginners.perl.org/ 1.6 - I don't see something in the FAQ, how can I make a suggestion? Send an email to [EMAIL PROTECTED] with your suggestion. 1.7 - Is there a supporting website for this list? Yes, there is. It is located at: http://beginners.perl.org/ 1.8 - Who owns this list? Who do I complain to? Casey West owns the beginners-cgi list. You can contact him at [EMAIL PROTECTED] 1.9 - Who currently maintains the FAQ? Kevin Meltzer, who can be reached at the email address (for FAQ suggestions only) in question 1.6 1.10 - Who will maintain peace and flow on the list? Casey West, Kevin Meltzer and Ask Bjoern Hansen currently carry large, yet padded, clue-sticks to maintain peace and order on the list. If you are privately emailed by one of these folks for flaming, being off-topic, etc... please listen to what they say. If you see a message sent to the list by one of these people saying that a thread is closed, do not continue to post to the list on that thread! If you do, you will not only meet face to face with a XQJ-37 nuclear powered pansexual roto-plooker, but you may also be taken off of the list. These people simply want to make sure the list stays topical, and above-all, useful to Perl/CGI beginners. 1.11 - When was this FAQ last updated? Sept 07, 2001 2 - Questions about the 'beginners-cgi' list. 2.1 - What is the list for? A list for beginning Perl programmers to ask questions in a friendly atmosphere. The topic of the list is, of course, CGI with Perl. 2.2 - What is this list _not_ for? * SPAM * Homework * Solicitation * Things that aren't Perl related * Non Perl/CGI questions or issues * Lemurs 2.3 - Are there any rules? Yes. As with most communities, there are rules. Not many, and ones that shouldn't need to be mentioned, but they are. * Be nice * No flaming * Have fun 2.4 - What topics are allowed on this list? Basically, if it has to do with Perl/CGI , then it is allowed. If your question has nothing at all to do with Perl/CGI, it will likely be ignored. 2.5 - I want to help, what should I do? Subscribe to the list! If you see a question which you can give an idiomatic and Good answer to, answer away! If you do not know the answer, wait for someone to answer, and learn a little. 2.6 - Is there anything I should keep in mind while answering? We don't want to see 'RTFM'. That isn't very helpful. Instead, guide the beginner to the place in the FM they should R :) 2.7 - I don't want to post a question if it is in an FAQ. Where should I look first? Look in the FAQ! Get acquainted with the 'perldoc' utility, and use it. It can save everyone time if you look in the Perl FAQs first, instead of having a list of people refer you to the Perl FAQs :) You can learn about 'perldoc' by typing: perldoc perldoc At your command prompt. You can also view documentation online at: http://www.perldoc.com and http://www.perl.com 3 - Other Resources 3.1 - What other websites may be useful to a beginner ? * Perl Home Page - http://www.perl.com * PerlMonks - http://www.perlmonks.org * Perldoc - http://www.perldoc.com * Perl Archives - http://www.perlarchives.com 3.2 - What resources may be harmful to a beginner? Beware of Perl4-like code-- You might find some script archives and unauthorized mirrors with old Perl4 versions of Selena Sol and Matt Wright scripts. Don't use those scripts. They are outdated and may even in some cases contain bugs or security problems since many may not have been updated in
Re: Fw: 2 Questions
--- Kyle Babich [EMAIL PROTECTED] wrote: Sorry for bothering everyone again, but could someone tell me what to change so that I can import variables from external files and get them to work in the current file? (see original message) Thank you, Kyle Copied from perldoc CGI: -- begin quote -- CREATING A NEW QUERY OBJECT FROM AN INPUT FILE $query = new CGI(INPUTFILE); If you provide a file handle to the new() method, it will read parameters from the file (or STDIN, or whatever). The file can be in any of the forms describing below under debugging (i.e. a series of newline delimited TAG=VALUE pairs will work). Conveniently, this type of file is created by the save () method (see below). Multiple records can be saved and restored. -- end quote -- Note that this requires use of CGI's object-oriented interface. So instead of use CGI qw/:standard/; print header, start_html; you instead say use CGI; my $query = new CGI(INPUTFILE); print $query-header, $query-start_html; or just my $query = new CGI; to get parameters the normal cgi way, or a variety of other ways which you can read about in perldoc CGI, which I encourage you to do. - John P.S. I'm about to unsubscribe to go on vacation. I will probably be back in a few weeks. = Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still alive, and there's nothing I want to do. - They Might Be Giants, http://www.tmbg.com __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Username Password Question
On Wed, 3 Jul 2002 08:30:35 -0700, [EMAIL PROTECTED] (Rhen Hernandez) wrote: hi everyone! I created a password and username for my website. My question is how can i direct the user to the homepage or main page of the website. Right now, the code is set for Permission Granted... I want to direct the user to the main page of the website after he/she is successful completed the form. Maybe I'm wrong here, I'm just quickly reading the code, but I don't think this approach gives you any REAL password protection. If you do the password check as you describe in your code, then redirect to a unprotected page, such as http://mygoodpassword.html what is to stop someone from bypassing your login page and entering the destination page directly in thier browser? You need to either .htaccess protect your destination page, which makes your logon form a waste of time, or you need to output your html from the cgi-script that does the password checking. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
too many headers from CGI script (max 200)
Hello, I keep receiving the following error message, but I have not found any information on the net as to what exactly this error means or how to correct it: [04/Jul/2002:08:53:13] failure ( 836): for host 172.21.xxx.xxx trying to GET /cgi-bin/template.cgi, cgi_scan_headers reports: the CGI program /appl/webdocs/cgi-bin/template.cgi did not produce a valid header (too many headers from CGI script (max 200)) Any suggestions? John Pitchko Data Services Saskatchewan Government Insurance
RE: too many headers from CGI script (max 200)
John, are you able to dump the total output (including headers) for this CGI? joel -Original Message- From: John Pitchko [mailto:[EMAIL PROTECTED]] Sent: 04 July 2002 15:56 To: [EMAIL PROTECTED] Subject: too many headers from CGI script (max 200) Hello, I keep receiving the following error message, but I have not found any information on the net as to what exactly this error means or how to correct it: [04/Jul/2002:08:53:13] failure ( 836): for host 172.21.xxx.xxx trying to GET /cgi-bin/template.cgi, cgi_scan_headers reports: the CGI program /appl/webdocs/cgi-bin/template.cgi did not produce a valid header (too many headers from CGI script (max 200)) Any suggestions? John Pitchko Data Services Saskatchewan Government Insurance -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: too many headers from CGI script (max 200)
Thanks, but I think I solved the problem. I was loading an array with all the contents of a particular directory and I don't think it liked having so many (for some strange reason). Either Perl or CGI.pm was unhappy with that. Anyways, thanks for the help. John Pitchko Data Services Joel Hughes [EMAIL PROTECTED] 07/04/02 09:54am John, are you able to dump the total output (including headers) for this CGI? joel -Original Message- From: John Pitchko [mailto:[EMAIL PROTECTED]] Sent: 04 July 2002 15:56 To: [EMAIL PROTECTED] Subject: too many headers from CGI script (max 200) Hello, I keep receiving the following error message, but I have not found any information on the net as to what exactly this error means or how to correct it: [04/Jul/2002:08:53:13] failure ( 836): for host 172.21.xxx.xxx trying to GET /cgi-bin/template.cgi, cgi_scan_headers reports: the CGI program /appl/webdocs/cgi-bin/template.cgi did not produce a valid header (too many headers from CGI script (max 200)) Any suggestions? John Pitchko Data Services Saskatchewan Government Insurance -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]