Re: Internal links with cgi

2005-03-26 Thread Felix Geerinckx
On 26/03/2005, Ankur Gupta wrote: > http://127.0.0.1/link.cgi#word";>word. > > When I click on the link word, I want the link.cgi to execute and > then it should navigate to the word "word". Add a name="word" attribute to you anchor element: word -- felix -- To unsubscribe, e-mail:

Re: http headers

2002-04-26 Thread Felix Geerinckx
on Fri, 26 Apr 2002 04:00:06 GMT, [EMAIL PROTECTED] (Conan chai) wrote: > more details on what i'm doing: > i'm doing a simple proxy server. Randal Schwartz has done a proxy server in one of his Webtechniques columns. Maybe you can get some ideas from it. See

Re: sending mail using Net::SMTP client

2002-05-10 Thread Felix Geerinckx
on Fri, 10 May 2002 07:12:48 GMT, [EMAIL PROTECTED] (David Ravikumar) wrote: > $smtp->to("[EMAIL PROTECTED]"); > $smtp->datasend("To: [EMAIL PROTECTED]"); > $smtp->datasend("From: [EMAIL PROTECTED] \n"); Within double quotes, you should escape your '@'. Either write "sd\@sd.com

Re: Sorry for the misunderstanding

2002-05-10 Thread Felix Geerinckx
on Wed, 08 May 2002 20:38:14 GMT, [EMAIL PROTECTED] (Richard Mr Usarec Buskirk) wrote: > I fixed my problem: > [...] > I have no errors and it works. I am glad you got it working. > I am new to cgi but i catch on quickly. Even though i didnt get a > response to help me. > I was hoping you guy

Re: trouble with checkbox group...

2002-05-11 Thread Felix Geerinckx
on Sat, 11 May 2002 01:55:06 GMT, Jake wrote: > foreach $person(@people){ > if($person=="otherPer"){ > $seeList .= $newGuy; > }else{ > $seeList .= $person.","; > } > } '==' is used for *numerical* comparisons. If you want to compare string

RE: Translating newlines to HTML paragraphs

2002-05-21 Thread Felix Geerinckx
on Tue, 21 May 2002 12:35:59 GMT, [EMAIL PROTECTED] (Bob Showalter) wrote: > This is dependent on the browser, and not the client OS. The > HTML standard would be controlling here, and it's pretty > vague if you look at the TEXTAREA section. It was somewhat less vague in the 'HTML 3.2 Referenc

Re: why is this showing up in my error_log?

2002-05-22 Thread Felix Geerinckx
on Wed, 22 May 2002 00:22:30 GMT, [EMAIL PROTECTED] (Jake) wrote: > open(outfile, ">".$pathToXML ) or die ("couldnt open xml file"); > [...] > Unquoted string "outfile" may clash with future reserved word at > /var/www/cgi-bin/adminWorkReport2.cgi line 66. > [...] > open(assignFile, ">".$pathToA

Re: Sysread and syswrite

2002-05-22 Thread Felix Geerinckx
on Wed, 22 May 2002 08:07:07 GMT, [EMAIL PROTECTED] (Chaoz Inferno) wrote: > I want to print out a variable to my client over the internet, but > would like to use syswrite and sysread would help to reduce > mistakes in EOF characters. Why do you think that? > #!/usr/bin/perl > my $buffer; >

Re: Sysread and syswrite

2002-05-22 Thread Felix Geerinckx
on Wed, 22 May 2002 09:54:33 GMT, [EMAIL PROTECTED] (Chaoz Inferno) wrote: > Well, the problem is that I have to print an html header back to > the client, and the usual print, I am getting irregular response? I never had any problems using 'print', in combination with the CGI.pm module on an

Re: use variables in regex||solved

2002-05-22 Thread Felix Geerinckx
on Wed, 22 May 2002 10:26:34 GMT, [EMAIL PROTECTED] (Sven Bentlage) wrote: > my $date = `/bin/date +%d.%m.%y`; > $date =~ tr/./-/; > chomp $date; There is no need to fork here. You can accomplish the same from within Perl, by replacing the above lines with my ($d, $m, $y) = (localtime)[3,

Re: Sockets tutorial

2002-05-22 Thread Felix Geerinckx
on Wed, 22 May 2002 11:14:34 GMT, [EMAIL PROTECTED] (Tim Fletcher) wrote: > Hi everyone, > I'm intressted in learning socket programming in perl. > does someone know of a good tutorial or mailing list that isn't > beginer or CGI oriented? Invest in Lincoln Stein's "Network Programming with Per

Re: DBI/update

2002-05-23 Thread Felix Geerinckx
on Thu, 23 May 2002 11:08:22 GMT, [EMAIL PROTECTED] (Sven Bentlage) wrote: > Hi everyone! > I'm getting desperate. Can't find the error in the snibblet of > code below...to me everything seems to be ok (except bad style > etc), but the update of the mysql database does not work altought > the s

Re: update query

2002-05-23 Thread Felix Geerinckx
on Thu, 23 May 2002 11:33:37 GMT, [EMAIL PROTECTED] (Sven Bentlage) wrote: >> Secondly: Have you tried to "print" out the actually query to see >> what it contains? > > not sure how to do that... Instead of $dbh->do("the sql-query"); write $sql = "the sql-query";

Re: [OT] RE: POD vs. # Comments

2002-06-10 Thread Felix Geerinckx
on Mon, 10 Jun 2002 17:37:46 GMT, John Brooking wrote: > [...] > If it's something about the internals that only > the developer needs to know, such as more explanation > of a particularly gnarly algorithm, then it needn't > and probably shouldn't be POD. Don't confuse your > audience with things

Re: [OT] RE: POD vs. # Comments

2002-06-10 Thread Felix Geerinckx
on Mon, 10 Jun 2002 18:56:20 GMT, David T-G wrote: > Yeah, but the point is that I still don't know what I'm doing. > > I've seen =head1 and =head2 and I don't know how they map to anything > else... Is there a primer outlining all of the =* directives and how > they go together? So far all I

Re: Example for "uniq"

2002-06-11 Thread Felix Geerinckx
on Tue, 11 Jun 2002 07:36:48 GMT, [EMAIL PROTECTED] (Chang Ming Huei) wrote: > To count the repeated data, I can use > cat xxx.dat | uniq -c > > It can get the result > 3 aa > 2 bb > 1 cc > > But how to do it use perl ? #! perl -w use strict; my %words; $words{$_}++ while (

Re: Having problems with login

2002-06-12 Thread Felix Geerinckx
on Wed, 12 Jun 2002 12:51:29 GMT, [EMAIL PROTECTED] (Ben Huyghebaert) wrote: >Here is the code I'm using right now. I open up the file with >the usernames and passwords and throw it all into @access and >then do this If you put your username/password pairs in a hash instead of an

Re: number

2002-06-20 Thread Felix Geerinckx
on Thu, 20 Jun 2002 18:16:59 GMT, Bo Mangor wrote: > I have a file input where I split the file into an array and that works > fine, but there is some "spam" in the beginning of the file I want to > get rid of - the problem is that I never know how many lines there is > with this "spam"! > > The

Re: fetchall problem

2002-06-21 Thread Felix Geerinckx
on Thu, 20 Jun 2002 22:30:36 GMT, [EMAIL PROTECTED] (Maureen E Fischer) wrote: > I am stuck on a bug in my perl cgi program that uses a mysql > database. In executing the following code I am getting a message > in the dump that the > fetch failed --fetch () without execute () > [...] > > $s

Re: GET/POST handleing

2002-06-22 Thread Felix Geerinckx
on Sat, 22 Jun 2002 19:21:12 GMT, wrote: > What would be better then useing the following? I'm lookign for > something better and more secure. If there is such a thing CGI.pm -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: AW: param problem

2002-06-25 Thread Felix Geerinckx
on Tue, 25 Jun 2002 13:10:05 GMT, [EMAIL PROTECTED] (Theuerkorn Johannes) wrote: > Thanks, but this doesn´t work either, the problem with the + is > that the cgi:param method takes everything after the & sign as the > next variable. As the syntax for the param method is: > http://server/script.p

Re: Renaming files

2002-06-25 Thread Felix Geerinckx
on Tue, 25 Jun 2002 19:51:14 GMT, JoãO Paulo wrote: > > How can I quickly change the extension of a lot of files??? > > something like "file" into "file.something" ,JP. perldoc -f rename perldoc -f opendir perldoc -f readdir -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: uninitialized value?

2002-06-26 Thread Felix Geerinckx
on Wed, 26 Jun 2002 11:58:12 GMT, [EMAIL PROTECTED] (David Vd Geer Inhuur Tbv Iplib) wrote: > Actualy I prefer this : > > if (($c eq "h") || ($c eq "eh") || ($c eq "hd") || ($c eq "p") || > ($c eq "c")) { $content = qq{\n}; } Why not use my %in = map { $_ => 1} qw(h eh hd p c); $cont

Re: uninitialized value?

2002-06-26 Thread Felix Geerinckx
on Wed, 26 Jun 2002 22:56:23 GMT, [EMAIL PROTECTED] (Drieux) wrote: > We keep tossing around these 'map' tricks - > and I was wondering why we do not put them up in > the > > BEGIN { > %in = map { $_ => 1} qw(h eh hd p c); > > } > > So that we compile them onc

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

2002-06-26 Thread Felix Geerinckx
on Thu, 27 Jun 2002 02:54:10 GMT, [EMAIL PROTECTED] (Scot Robnett) wrote: >> Its pretty hard to make it more simple than: >> use Form; >> my %input = Form(); > > Let me try. > > > use CGI; > %params = $q->Vars; > Try again. Your c

Re: What's wrong with this?

2002-07-01 Thread Felix Geerinckx
on Mon, 01 Jul 2002 15:22:00 GMT, [EMAIL PROTECTED] (Kyle Babich) wrote: > open(text,"text.txt") or die ("error: text.txt failed\n"); > [...] > bash-2.05$ perl -Tcw index.pl > Unquoted string "text" may clash with future reserved word at > index.pl line 17. > [..] > How do I fix it? >From p

Re: Concatenating names from form

2002-07-04 Thread Felix Geerinckx
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 unsubscrib

Re: Less than a second?

2002-07-12 Thread Felix Geerinckx
on Thu, 11 Jul 2002 11:26:05 GMT, Octavian Rasnita wrote: > I want to calculate how much time a Perl script runs. > Can you tell me how to calculate using fractions of a second? > > The script may run in less than a second, but Perl always tell me 1 > second, or 2 seconds, etc. Use the Time::H

Re: Less than a second?

2002-07-12 Thread Felix Geerinckx
on Fri, 12 Jul 2002 15:35:06 GMT, Zentara wrote: > On 12 Jul 2002 12:16:39 -, [EMAIL PROTECTED] (Felix > Geerinckx) wrote: > >>on Thu, 11 Jul 2002 11:26:05 GMT, Octavian Rasnita wrote: >> >>> I want to calculate how much time a Perl script runs. >>>

Re: 401

2002-07-13 Thread Felix Geerinckx
on Sat, 13 Jul 2002 08:38:05 GMT, Hytham Shehab wrote: > how could i get a page - using lwp - when this is page have a > credenitals lookup, it keep sends me 401 status code, but i don't > know how to pass the user/pass to this page. > any idea? Look for the 'ACCESS TO PROTECTED DOCUMENTS' s

Re: graphic on-the-fly

2002-07-15 Thread Felix Geerinckx
on Mon, 15 Jul 2002 13:03:45 GMT, Konrad Foerstner wrote: > I would like to have a script which > produces graphics on the fly,b ut there > are some problems: See Randal Schwartz' Web Techniques Column 60 on "Embedding a dynamic image in CGI output" at

Re: Fwd: errors

2002-08-02 Thread Felix Geerinckx
on Fri, 02 Aug 2002 12:24:29 GMT, [EMAIL PROTECTED] (Kyle Babich) wrote: > Sorry, forgot to attach it. Please don't attach files to your posts. You can always cut and paste the relevant code directly into your message body. Your error is in line 13, where you write: > [one line wrapped] > pri

Re: Problem with the code

2002-08-10 Thread Felix Geerinckx
on Sat, 10 Aug 2002 07:41:39 GMT, Soheil Shaghaghi wrote: > The following sub checks for bad e-mail address, and reports it: [code snipped] > However, the code is rejecting the domains ending with .info, and > .name (the reason is that it has 4 digits after the zero) > Can someone please tell m

Re: new lines

2002-08-13 Thread Felix Geerinckx
on Tue, 13 Aug 2002 08:19:39 GMT, [EMAIL PROTECTED] (Jimmy George) wrote: > This script is from a text book [code snipped] > but how do we put \n's into it for a better display on the screen?? All "\n" are ignored by you webbrowser (unless they are between a pair of tags). If you want to s

Re: Parsing problem

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 08:20:50 GMT, [EMAIL PROTECTED] (Janek Schleicher) wrote: > or still shorter: > my %data = map {chomp; split /= /} `myapp`; Shorter yet: my %data = map {split /= |\n/} `myapp`; -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: Menus and Forms

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 09:01:53 GMT, [EMAIL PROTECTED] (Margaret) wrote: > 2) Something similar to the above. When some fields are filled in > on a form(Form1), the user presses submit and goes on to another > form (Form2), more fields are filled in depending on form1's > input. Form2 is submitted

Re: apache::*, simple question.

2002-08-20 Thread Felix Geerinckx
on Tue, 20 Aug 2002 18:35:49 GMT, Hytham Shehab wrote: > is it a must to use mod_perl to access all/some apache::* > modules?, i > mean, if i run normal perl and cgi scripts, i won't be able to access > apache modules? No it is not a must, it depends on the module. Apache::Session, e.g.

Re: Question about dates

2002-08-26 Thread Felix Geerinckx
on Mon, 26 Aug 2002 20:37:22 GMT, Soheil Shaghaghi wrote: > I want to sell a service. > I have a form where the user comes to purchase the service. > I can get the date from SQL database in any format and display it in > form. > > At this point, when the user fills out the form and submits it,

Re: Retrieving data from files

2002-08-27 Thread Felix Geerinckx
on Tue, 27 Aug 2002 16:33:42 GMT, Soheil Shaghaghi wrote: > I am using a program that gets the user information and stores them. The > program stores each user data in a separate file, like userid.tmp > > The data that is in each file looks like this: > > username#!#fullname#!#email#!#userid#!#

Re: Error: requires explicit package name

2002-08-30 Thread Felix Geerinckx
on Fri, 30 Aug 2002 13:58:47 GMT, [EMAIL PROTECTED] (T) wrote: > "Global symbol "$auto" requires explicit package name" [...] > if ($Country eq "Argentina") > {my $auto = $q->param( '[EMAIL PROTECTED]' ); > } > and > if ($Country eq "Argentina") > {$auto = $q->pa

Re: sorting arrays of arrays

2002-08-30 Thread Felix Geerinckx
on Fri, 30 Aug 2002 14:29:40 GMT, [EMAIL PROTECTED] (Alex B.) wrote: > 1. how do I assign new dynamic arrays, like @a25 if there is 25 > rows? or lets say there is 78 rows, then I don't really want to > type "my @a00 = ();" through "my @a77 = ();" using the strict > module... is there a way of so

Re: database connection problem

2002-08-30 Thread Felix Geerinckx
on Fri, 30 Aug 2002 16:46:08 GMT, Aman Cgiperl wrote: > 12 my $dth = DBI->connect("DBI:mysql:db_name","user","pass"); > 26 my $sth_check = dth->prepare("SELECT * FROM mytab WHERE ^ Try $dth->prepare(...); ^ -- felix -- To unsubscribe,

Re: Encoding text

2002-09-24 Thread Felix Geerinckx
on Sun, 22 Sep 2002 07:13:28 GMT, [EMAIL PROTECTED] (Mike Craig) wrote: > Hi, > > I want to encode a string using the translate function. [...] > Your suggestions will be appreciated. http://search.cpan.org/author/MRJC/cvswebedit-v2.0b1/cvs- web/lib/URI/Escape.pm -- felix -- To

Re: Saving CGI session to DB

2002-10-03 Thread Felix Geerinckx
on Wed, 02 Oct 2002 23:37:54 GMT, Kevin wrote: > How can I save a CGI session to a db. I have only seen an example to a > filehandle in the documentation. http://search.cpan.org/author/JBAKER/Apache-Session-1.54/Session.pm -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: replacing numbers around a decimal

2002-10-18 Thread Felix Geerinckx
on wo, 16 okt 2002 20:03:31 GMT, Andrew Hughes wrote: > I am creating a little calculator that is going to need to take a > user entered number that will always have 2 decimal places (using > sprintf). It could be 89562321.29 or it could be 101.00) and take > the last 4 digits (with the period in

Re: APACHE CGI Configuration

2002-10-31 Thread Felix Geerinckx
on Thu, 31 Oct 2002 04:50:43 GMT, [EMAIL PROTECTED] (Vinai Ar) wrote: [ Please don't post multipart messages - post text only] > I am entirely new to apache and CGI. Can any one help me out in > making apache server to execute the CGI scripts. The error message > that I got it "couldn't spawn c

Re: Data Validation Issues

2003-02-07 Thread Felix Geerinckx
on vr, 07 feb 2003 18:54:25 GMT, Will wrote: > Second, suppose they try a username that has already > been taken. I need a way to kick back an error > message > to them. I tried setting the username field in the > usrs table to UNIQUE, so that might help if someone > tried to insert something al

Re: How to resolve properly exception

2003-02-14 Thread Felix Geerinckx
on Fri, 14 Feb 2003 12:38:16 GMT, [EMAIL PROTECTED] (Khalid Naji) wrote: > How can I write exception with Perl ? See, e.g., "Object Oriented Exception Handling in Perl" by Arun Udaya Shankar, available at -- felix -- To unsubscribe,

Re: help with HTTP::Request for POST

2003-02-18 Thread Felix Geerinckx
on di, 18 feb 2003 16:43:22 GMT, Scott Lutz wrote: > What I am attempting to do, is do a server side "form action" > redirect based on a regex on a field from the form. It now seems that > this is just going to POST the form data, and leave the user hanging. > Is HTTP::Request the best way to dire

Re: NULL insertion

2003-02-25 Thread Felix Geerinckx
on Mon, 24 Feb 2003 22:54:59 GMT, [EMAIL PROTECTED] (T. Murlidharan Nair) wrote: > I need to insert NULL into the database using a perl CGI . So if a > variable is to be made NULL in perl and it needs to be used in an > sql statement what is best way to do it. Do I assign ' \N' to it > or 'NULL'

Re: checking if its a real number

2003-02-27 Thread Felix Geerinckx
on Thu, 27 Feb 2003 00:30:56 GMT, [EMAIL PROTECTED] (T. Murlidharan Nair) wrote: > I have a cgi that need to accept only numeric values. ie +ve or > -ve real numbers. > Is there a quick and easy way to check this. This is a FAQ. See perldoc -q float -- feliex -- To unsubscribe, e

Re: checking if its a real number

2003-02-27 Thread Felix Geerinckx
on Thu, 27 Feb 2003 13:34:40 GMT, [EMAIL PROTECTED] (Zentara) wrote: > if (/\D/){ print "has nondigits\n" } > if (/^\d+$/) { print "is a whole number\n" } > if (/^-?\d+$/) { print "is an integer\n" } > if (/^[+-]?\d+$/){ print "is a +/- integer\n" } > if (/^-?\d+\.?\

Re: DBI question

2003-02-27 Thread Felix Geerinckx
on do, 27 feb 2003 16:57:59 GMT, Scot Robnett wrote: > I have a script which is supposed to e-mail a user their > username/password info as long as their e-mail address is in the > database. The following code works if the address is in the database > (it prints the approval page and sends the mai