Perl and SSL
Hello all, My problem is that I have two GCIs that work without no problem under HTTP, but does not happen the same under HTTPS. Under HTTPS, the first cgi load without no problem, when from the first cgi pulse the button "continue" and I redirect to the second cgi leaves the page to me error. If I return to try this same one second then time if it works to me. This problem does not give me under HTTP but if under HTTPS, in addition, just before redirecting to the second cgi and being under HTTPS (a safe connection assumes that) the navigator it says to me that I am going to leave a safe connection, what is what happens? it is problem to use Perl under SSL? Note: The pages are in a safe server.
Re: Global Constants in Perl ?
Hi Doug here. I would like to include this information (see below) at the top of all of my CGI scripts. In such a way that if I upload all of my CGI scripts to a different server all I have to do is change one file and all of my scripts should work on the new server. #$SMTP_SERVER="localhost"; $SEND_MAIL="/usr/lib/sendmail -t"; $BASEDIR="/usr/www/my-server/grayspace"; $BASEURL="http://my-server/grayspace";; $SITEURL="http://my-server/cgi-bin/grayspace/rod/rod.cgi";; $SITENAME="my-server"; $PARENTURL="http://www.my-server";; $EXT=".html"; $PROGNAME="/cgi-bin/card.cgi"; $PROGAREA="/cgi-bin/grayspace/rod"; $MAILLOG="ml1"; $SUBJECT ="my-server subject line here!"; * What is the best to do this? Many thanks in advance [EMAIL PROTECTED] Note: I use " @ " instead of the " @ " sign on my webpages avoid spiders. - Original Message - From: "John Edwards" <[EMAIL PROTECTED]> To: "'Stephen.Hurley'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 9:22 AM Subject: RE: Global Constants in Perl ? > Yep. Use the constant function > > http://perlhelp.web.cern.ch/PerlHelp/lib/constant.html > > -Original Message- > From: Stephen.Hurley [mailto:[EMAIL PROTECTED]] > Sent: 19 February 2002 17:31 > To: '[EMAIL PROTECTED]' > Subject: Global Constants in Perl ? > > > Hi, > > I was wondering if there was a way of defining global constants in Perl ? I > "use strict" to keep all my variables tidy. However, there are a number of > "#define"-like vars that I would like to keep all together at the top of my > files, so that they can be reconfigured by whoever maintains my code > (filenames and such). Since these won't need to be changed by the script...I > wanna make 'em constants. But I also don't want to have to keep passing them > around to subroutines (I want to them to be global). But I also would like > to "use strict" (which tends not to like global variables). Is there any > "#define"-like construct in Perl or am I asking for too much ? If so, what's > the next best thing ? > > Steve. > > > > /. > Stephen Hurley, > Room CS2-034, > IDC, University Of Limerick. > > P. 087-6701459 > E. [EMAIL PROTECTED] > A. Apt.10, Charlotte Q, Limerick City. > > "I'm not a conspiracy theorist, but there are people here who are trying to > make me look like one..." > > .../ > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --Confidentiality--. > This E-mail is confidential. It should not be read, copied, disclosed or > used by any person other than the intended recipient. Unauthorised use, > disclosure or copying by whatever medium is strictly prohibited and may be > unlawful. If you have received this E-mail in error please contact the > sender immediately and delete the E-mail from your system. > > > > -- > 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: Printing data into a file every time some presses
Hi Zentara I haven't forgotten..., thanks so much for your assistance. Appreiciation. thanks again Cheers :) Bruce -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is the value of @_4_[0], and $return_me? (see below)
Well, for a start, you have a spelling mistake in there... my $retun_me = shift; - probably should be - my $return_me = shift; Secondly, what exactly are you trying to do with this code ? I don't know too much about perl, but I think the assignment: @_ = @arr; might be a little suspicious. I normally grab the arguments passed to my sub routine from @_ , I don't usually assign *to* it. In the end, it seems like this subroutine should return the first value in @arr, which is 0. Does any of this help ? -Original Message- From: Bruce Ambraal [mailto:[EMAIL PROTECTED]] Sent: 20 February 2002 14:38 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: What is the value of @_4_[0], and $return_me? (see below) Hi 1. (see subject) 2. Explain lines 3 , 4 3.Why does'nt this coding return anything2 sub routine { my @arr = (0, 'a' 1, 'b'); @_ = @arr; my $retun_me = shift; return( $return_me ) }; -- 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]
What is the value of @_4_[0], and $return_me? (see below)
Hi 1. (see subject) 2. Explain lines 3 , 4 3.Why does'nt this coding return anything2 sub routine { my @arr = (0, 'a' 1, 'b'); @_ = @arr; my $retun_me = shift; return( $return_me ) }; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: What is the value of @_4_[0], and $return_me? (see below)
OOPs! I meant Fwd: What is the value of @_$_[0], and $return_me? (see below) --- Begin Message --- Hi 1. (see subject) 2. Explain lines 3 , 4 3.Why does'nt this coding return anything2 sub routine { my @arr = (0, 'a' 1, 'b'); @_ = @arr; my $retun_me = shift; return( $return_me ) }; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- End Message --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Regular Expressions
Hi everyone I am trying to learn Perl looking into some scripts. One of them has a regular expression inside. First of all, I need to know what two specific lines are doing. The code is bellow. $req =~ s/\r//g ; $req =~ s/([^\n]{72,72})\n([^\n]{1,71})\n([^\n]{1,71})$/$1\n$2$3/ I know they are replacing some things but cannot understand what. Specially the second one. I would really appreciate if somebody could explain to me what that regular expression means. It is kind of an emergency. And, if someone knows a link where there is more information about regular expressions, I would be grateful. Thanks in advance. Lilian
Linux Box,
Hi Doug here. I want to create a service like http://twistedhumor.com/ from a home server I have a old Pentium 1 PC which used to run VVindows 98 and I was wondering what type of "MODEM/NETCARD" do I need to run RedHatLinux to run Apache to run CGI/Perl? - And if I get a Bell Dialup connection - Question (1) What is the name of a hardware modem to attach to my Linux Box? - And if I get a Bell high speed connection - Question (2) What is the name of the netcard to attach to my Linux Box? Question (3) What is the best List or Group to get Linux Box information? Question (4) When I am done all of this can I, will I be able to use my Linux Box to automatically send email as a reply to someone that sent me a email with the word "Join" in the subject line, using CGI? Any Infomation would be helpful :-) Question (5) And the most important question! Where can I learn all there is to know about creating this email server using Linux, Apache, Perl/CGI. If you have a email service using CGI and a home Server, Please let me know about your setup. Hardware, Software, Configurations, just email me. Many Thanks as I am new to CGI/Perl [EMAIL PROTECTED] Please email me directly if you have any information that isn't CGI/Perl related. ;-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SHIFT in a subroutine
I was wondering about the "shift" inside a subroutine. I have never used it. What is the purpose of it been there? Thanks in advance, Nestor :-) - Original Message - From: "Stephen.Hurley" <[EMAIL PROTECTED]> To: "'Bruce Ambraal'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, February 20, 2002 6:58 AM Subject: RE: What is the value of @_4_[0], and $return_me? (see below) > Well, for a start, you have a spelling mistake in there... > > my $retun_me = shift; - probably should be - my $return_me = shift; > > Secondly, what exactly are you trying to do with this code ? I don't know > too much about perl, but I think the assignment: > @_ = @arr; > might be a little suspicious. I normally grab the arguments passed to my > sub routine from @_ , I don't usually assign *to* it. > In the end, it seems like this subroutine should return the first value in > @arr, which is 0. > > Does any of this help ? > > -Original Message- > From: Bruce Ambraal [mailto:[EMAIL PROTECTED]] > Sent: 20 February 2002 14:38 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: What is the value of @_4_[0], and $return_me? (see below) > > > Hi > > 1. (see subject) > 2. Explain lines 3 , 4 > 3.Why does'nt this coding return anything2 > > sub routine { > my @arr = (0, 'a' 1, 'b'); > @_ = @arr; > my $retun_me = shift; > return( $return_me ) > }; > > > -- > 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]
Re: SHIFT in a subroutine
On Wed, 20 Feb 2002, Nestor Florez wrote: > I was wondering about the "shift" inside a subroutine. > > I have never used it. What is the purpose of it been there? It pulls off the first element of the array passed to it. Using shift with no arguments always pulls from @_ -- it returns $_[0] and also shifts the other elements down ($_[1] becomes $_[0], $_[2] becomes $_[1], etc). @_ is the 'default' array (analogous to $_), and in a subroutine, is the array of subroutine arguments. If you say mysub('arg1', 'arg2'); then sub mysub { $arg1 = shift; #gets the first argument 'arg1' $arg2 = shift; #gets the second argument 'arg2' ... } -- Brett http://www.chapelperilous.net/ Computer programmers never die, they just get lost in the processing. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SHIFT in a subroutine
--- "Brett W. McCoy" <[EMAIL PROTECTED]> wrote: > On Wed, 20 Feb 2002, Nestor Florez wrote: > > > I was wondering about the "shift" inside a subroutine. > > > > I have never used it. What is the purpose of it been there? > > It pulls off the first element of the array passed to it. Using shift > with no arguments always pulls from @_ Brett, Great description with one minor caveat: shift with no arguments will pull from @ARGV if not used in a subroutine. 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(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ADMIN REDIRECT] Re: Regular Expressions
Hello, I am redirecting this question from beginners-cgi to beginners. Please respond to the original poster ([EMAIL PROTECTED]) and the beginners list. Please remember that non-CGI related questions should not be send to beginners-cgi. Thanks. Cheers, Kevin On Wed, Feb 20, 2002 at 01:13:55PM -0300, Lilian Alvarenga Caravela Godoy ([EMAIL PROTECTED]) said something similar to: > Hi everyone > > I am trying to learn Perl looking into some scripts. > > One of them has a regular expression inside. > > First of all, I need to know what two specific lines are doing. The code is > bellow. > > $req =~ s/\r//g ; > $req =~ s/([^\n]{72,72})\n([^\n]{1,71})\n([^\n]{1,71})$/$1\n$2$3/ > > I know they are replacing some things but cannot understand what. Specially > the second one. > > I would really appreciate if somebody could explain to me what that regular > expression means. It is kind of an emergency. > > And, if someone knows a link where there is more information about regular > expressions, I would be grateful. > > Thanks in advance. > > Lilian -- [Writing CGI Applications with Perl - http://perlcgi-book.com] Everywhere is walking distance if you have the time. -- Steven Wright -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
inputting a text file into an HTML page
ok I have the CGI script that will generate an html page based on what the user selects. I also want to give the user the oportunity to choose one of many different text files that can also be inputted into the html page via the cgi script. I have the opening tags and closing tags and tables set up in the script. The addition I would like to put in is between the lines with the # to help you find it. Thanks for any suggestions you can make $filename =<<__this_is_the_file__; $BODYTAG $params ) { $text = "$text.$_" } print $text would somthing like this work to allow the user to select a premade text file from an HTML form to have inputted into the HTML page. The rest of the script works fine this is an addition I am trying to do to it # FACE=ARIAL>$fields{'the_title'} $fields{'poam_select'} $fields{'the_message'} $fields{'sig_line'} This card was created by $fields{'sender_name'} (mailto:$fields{'sender_email'}> $fields{'sender_email'}) especially for $fields{'recip_name'}. If you would like to send a card to that special someone, just go to Card Creator by $SITENAME this___is_the_file__ } Check out www.my-pcdoctor4u.com for all kinds of FREE items including FREE E-Cards. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Time sensative Sub Routine
Using the Cron function on the server is not a problem. The promlem I have is not knowing how to set up the commands in the script and the HTML form that would let the users choose when they want the action preformed. From what I understand with the cron function, is that it will run the script at predetermined intervals. This does not give the users the ability to choose the date they want the action preformed. I'm sorry if it sounds confusing. I can not find any sub routines or scripts that allow for users to pre-select dates for actions to be preformed. I have a greeting card script and want users to be able to send cards days in advance that woulf only be delivered on the requested date. Pat At 11:14 AM 2/19/2002 -0500, Al Hospers wrote: >> I am looking for information or a turorial on making a time >> sensitive sub >> routine for developing an html page and sending emails. U >> want the users to >> be able to choose when they want their cards to be made and >> the date to >> have a notice sent to the recipient. > >check out the chron function on your web server > >Al Hospers >CamberSoft, Inc. >alcambersoftcom >http://www.cambersoft.com > >Shockwave and Director development, CD-ROM, HTML, >CGI scripting, and Graphic Design. > >A famous linguist once said: >"There is no language wherein a double >positive can form a negative." > >YEAH, RIGHT > > > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > Check out www.my-pcdoctor4u.com for all kinds of FREE items including FREE E-Cards. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the value of @_4_[0], and $return_me? (see below)
also, it seems you might have left out a comma between the 'a' and 1 in this: >>my @arr = (0, 'a' 1, 'b'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SHIFT in a subroutine
On Wed, 20 Feb 2002, Curtis Poe wrote: > Great description with one minor caveat: shift with no arguments will > pull from @ARGV if not used in a subroutine. Yes, thanks for pointing that out. -- Brett http://www.chapelperilous.net/ tax office, n.: Den of inequity. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Time sensative Sub Routine
> I can not find any sub routines or scripts that allow for users to > pre-select dates for actions to be preformed. I have a > greeting card script > and want users to be able to send cards days in advance that > woulf only be > delivered on the requested date. there are likely not any precanned routines for this. one way to implement it is have the cron called often. it triggers a script that looks thru the pending jobs list & executes the ones that are within some time range and then removes them from the list. the list is created by the users calling another script. they choose their time and the script adds their job to the list. hth Al Hospers CamberSoft, Inc. alcambersoftcom http://www.cambersoft.com Shockwave and Director development, CD-ROM, HTML, CGI scripting, and Graphic Design. A famous linguist once said: "There is no language wherein a double positive can form a negative." YEAH, RIGHT -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Time sensative Sub Routine
Ok I understand part of the Cron and it checking often to see if a script needs to be executed. But i still dotn understand if I set up the HTML page where the user selects the date they want the function to happen, how do I set up the CGI script to read this and how does the Cron function know read they date selected for this function. Keep in mind today we could get 10 people choosing 10 different dates. So yes I have cron set to run daily at 12.05 am but how will it know if the cgi script has any files that a user has chosen to make for that date. I know I am confusing things now. I am just trying to understand the process of how this happens. Pat At 10:01 PM 2/20/2002 -0500, Al Hospers wrote: >> I can not find any sub routines or scripts that allow for users to >> pre-select dates for actions to be preformed. I have a >> greeting card script >> and want users to be able to send cards days in advance that >> woulf only be >> delivered on the requested date. > >there are likely not any precanned routines for this. one way to >implement it is have the cron called often. it triggers a script that >looks thru the pending jobs list & executes the ones that are within >some time range and then removes them from the list. the list is >created by the users calling another script. they choose their time >and the script adds their job to the list. > >hth > >Al Hospers >CamberSoft, Inc. >alcambersoftcom >http://www.cambersoft.com > >Shockwave and Director development, CD-ROM, HTML, >CGI scripting, and Graphic Design. > >A famous linguist once said: >"There is no language wherein a double >positive can form a negative." > >YEAH, RIGHT > > > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > Check out www.my-pcdoctor4u.com for all kinds of FREE items including FREE E-Cards. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Time sensative Sub Routine
> Ok I understand part of the Cron and it checking often to see > if a script > needs to be executed. But i still dotn understand if I set up > the HTML page > where the user selects the date they want the function to > happen, how do I > set up the CGI script to read this and how does the Cron > function know read > they date selected for this function. Keep in mind today we > could get 10 > people choosing 10 different dates. So yes I have cron set to > run daily at > 12.05 am but how will it know if the cgi script has any files > that a user > has chosen to make for that date. I don't have the time to write this for you... 1 - there is a CGI script that is called by the HTML page that writes the user's requested time & other info into a list on the server. a database would even be better. 1 - the cron runs probably every hour of the day 2 - there is a script that the cron calls that reads the list/database & gets all the users that are within that time period & does whatever you need with the info - send an email, whatever. it's really pretty straight ahead. hth Al Hospers CamberSoft, Inc. alcambersoftcom http://www.cambersoft.com Shockwave and Director development, CD-ROM, HTML, CGI scripting, and Graphic Design. A famous linguist once said: "There is no language wherein a double positive can form a negative." YEAH, RIGHT -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]