Match and remove an element in an array

2002-03-15 Thread Rob Roudebush
Okay my script takes names from a fom and puts them into an array - then later I need to match a $variable (one of the names) against that array and take that specific element out of the array. I figure there is probably an easy function to do this? @array=(john, lucy, mike); $name=john I ne

Help for Class-Tree module

2002-03-15 Thread shilpa deshpande
Hi All, I want to use the Class-Tree-1.20 module. But I am unable to install and use it b'coz it is giving some error "Environment variable 'perceps' not found" I have read the README file and documentation for 'perceps'. But still I am unable to resolve it. Can you please help me? Thanks,

Re: Match and remove an element in an array

2002-03-15 Thread fliptop
Rob Roudebush wrote: > Okay my script takes names from a fom and puts them into an array - then later I >need to match a $variable (one of the names) against that array and take that >specific element out of the array. I figure there is probably an easy function to do >this? > @array=(john, l

Re: Match and remove an element in an array

2002-03-15 Thread Andre` Niel Cameron
Here is my way: if(scalar(grep(/^$object$/, @Equipped))) { @Equipped= grep { $_ ne $object } @Equipped;} It searches the array @Equipped for an objext if it finds it then removes it be searching threw the whole array and skiping the object as it assigns it to the array. Hope this helps. Regard

Re: How can I Track the client IP, when a web request is made to my server.

2002-03-15 Thread Vijay Kumar
hi, Thank You. This problem is solved when a client is contacted Directly to my server. But What about Other users connecting through their Proxy's Is there any chance to Rectify this Thanx vijay - Original Message - From: Rob Roudebush To: vijayak ; [EMAIL PROTECTED] Sent

customising forms

2002-03-15 Thread Matthew Harrison
what do i have to do to make changes to a form like change the background colour of a text field or the face of a button? is it in perl or what? -- Matthew Harrison Internet/Network Services Administrator Peanut-Butter Cheesecake Hosting Services Genstate www.peanutbuttercheesecake.co.uk --

RE: customising forms

2002-03-15 Thread Hanson, Robert
That all depends on if you want to do it server side or client side. I usually prefer the server side, in which case your Perl script would handle that. The easiest way is to use some sort of template module, I usually use HTML::Template. http://search.cpan.org/search?mode=module&query=HTML::Te

parsing a domain name out of an email address

2002-03-15 Thread Eric Peers
I'm attempting to parse a domain name out of a email address with the following code: my $EmailAddress = $to; if ($EmailAddress =~ (/^\w+\@aol\.com)$/i){ my $msg = "/www/docs/sips_mar02aol.txt"; } else my $msg = "/www/docs/sips_mar02.html"; } Being new to regular

RE: parsing a domain name out of an email address

2002-03-15 Thread Tim Doty
for starters the regex is invalid. the first closing parens comes too soon. try: if ($EmailAddress =~ (/^\w+\@aol\.com$/i)){ tim > -Original Message- > From: Eric Peers [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 15, 2002 1:45 PM > To: [EMAIL PROTECTED] > Subject: parsing a do

Re: parsing a domain name out of an email address

2002-03-15 Thread Eric Peers
Thank you. That helped get the script to compile. Neither file is being opened, but that me be a permissions issue. I've expanded the code out a bit (and made a correction to the if/then statement): my $EmailAddress = $to; if ($EmailAddress =~ (/^\w+\@aol\.com$/i)) { my $msg =

RE: parsing a domain name out of an email address

2002-03-15 Thread Rand Cufley
Hi Eric, I believe you need a blank line after the email header before you start your message body. -Rand -Original Message- From: Eric Peers [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 11:50 AM To: Tim Doty; [EMAIL PROTECTED] Subject: Re: parsing a domain name out of an ema

RE: html in a cgi script

2002-03-15 Thread Jessica Ortiz
Hi Scott, I am in the same boat like Matthew here. Do you have any examples to implement selection list boxes, text boxes, as well as checkboxes? I'd just like to see how you would do that using this style of html: use CGI; # use CGI.pm $q = new CGI; # initiate a new CGI object $q->header

RE: html in a cgi script

2002-03-15 Thread Scot Robnett
Jessica, most of the information you are looking for is available in the help documentation for CGI.pm. Try 'perldoc CGI.pm' and go through it until you find the form examples. Here's a *very* basic example of a form with a select menu: #!/usr/bin/perl use CGI; use strict; my $q = new CGI; print

RE: html in a cgi script

2002-03-15 Thread Scot Robnett
Sorry, setting up the CGI object was useless in that case, since I didn't use the object to create the fields. My bad. Sorry. -Original Message- From: Scot Robnett [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 6:13 PM To: Jessica Ortiz; [EMAIL PROTECTED] Subject: RE: html in a

Secure Logoff from Session CGI

2002-03-15 Thread Sean Abrahams
I have a small series of web pages that talks to a database and uses forms to input/alter data. In order to get to these web pages a user has to authenticate. If valid, I put a cookie on their machine that expires in 10 minutes. So basically, they can use the forms for up to 10 minutes, from whic

Re: Secure Logoff from Session CGI

2002-03-15 Thread Rob Roudebush
I'm not sure, but how do you set a cookie and have it expire in ten minutes? -Rob --- Sean Abrahams <[EMAIL PROTECTED]> wrote: > I have a small series of web pages that talks to a > database and uses > forms to input/alter data. > > In order to get to these web pages a user has to > authenticat