beginner's addressbook tutorial - step 1 - analyzing the project

2001-06-08 Thread fliptop
step 1 is complete, and is available at: http://www.peacecomputers.com/addressbook_toot-step1.html coming next - step 2 - developing the database

RE: Succinct Code, Use of my $var and global vs local

2001-06-08 Thread Alan F. Larimer, Jr.
> I'd love to view the sources, especially how you pull the data from the > form > and store it. Sorry for such a basic request but it is a beginner's list. Frank, It is and is not a basic request. "Basic" is such a loose term. It doesn't really "store" the info, although a few variations on

Re: cgi-lib.pl link

2001-06-08 Thread Douglas Sparling
--- Curtis Poe <[EMAIL PROTECTED]> wrote: > Recently, someone sent a link to an article by (I > think) Mark-Jason Dominus which explained all of > the bad things about cgi-lib.pl. Could someone > please resend the link? I'd like to have it handy > to send to people rather than have to "re-expla

cgi-lib.pl link

2001-06-08 Thread Curtis Poe
Recently, someone sent a link to an article by (I think) Mark-Jason Dominus which explained all of the bad things about cgi-lib.pl. Could someone please resend the link? I'd like to have it handy to send to people rather than have to "re-explain" everything. Cheers, Curtis Poe = Senior P

Re: tutorial proposition (was: Re: Succinct Code, Use of my $var and global vs local)

2001-06-08 Thread fliptop
Mark Rowlands wrote: > > Yes, everything is of use!..but here' a thought:- I have just finished > reading a paper by a well known perl guru. All fine and good and no doubt > technically spot on..but at no point does it ever suggest why you might > choose approach a over approach b. A pa

Re: INSERTing problems

2001-06-08 Thread Jeff Yoak
At 05:28 AM 6/8/01 -0700, Randal L. Schwartz wrote: > > "Jeff" == Jeff Yoak <[EMAIL PROTECTED]> writes: > >Jeff> I'm coming in on the middle of a thread here, but generally the best >Jeff> thing to do when working with databases in Perl is to us DBI, and if >Jeff> you are doing that, database

RE: using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
> the script should be ... thanks John. OK got it working. so what am I looking for? here is some of the info: PATHS are: /bin /usr/vde/bin /usr/local/bin /usr/gnu/bin /usr/ucb /usr/css/bin /usr/local/cvbin $INC[1]= /usr/local/pkg/perl5/lib $INC[2]= /usr/local/pkg/perl5/lib/site_perl/sun4-so

RE: using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
tdk wrote: Did you just copy the FTP.pm file into this area, or did you actually do the install? i.e., something like perl Makefile.PL prefix=/myinstall/directory make make test make install I just deleted the entire libnet folder & started over. so, first I did: perl Makefile.PL prefix=/l

RE: Usernames and Passwords

2001-06-08 Thread Farouk Khawaja
The way I like to do it is to use a LDAP server for authentication and entitlement. In addition to both username and password being stored, you can create attributes that will allow you to define the level of access for each user. Also, with a centralized LDAP service, all your web servers are a

RE: using modules installed in local CGI bin

2001-06-08 Thread Moon, John
Sorry Al, the script should be ... jwm print "Content-Type:text/html\n\n"; # w/o space works OK on my server :) print

Circular reference

2001-06-08 Thread Kris Cook
I wrote a Perl script that receives a trio of parameters (DSN, user ID and password), and validates that the UserID and Passwd match a pair in the database. It then displays a message based on whether you validated, and gves you a continue button. This seems to work fine, but when you click on c

Re: change my ID Please...

2001-06-08 Thread Ask Bjoern Hansen
On Fri, 8 Jun 2001, robert commer wrote: > I accidentally subscribed using my bigfoot account, which > redirects to my yahoo account, so when I unsubscribe as you > described below, I get a confirmation request on my yahoo > account - since bigfoot is just a redirec account. Therefore, > there i

Re: change my ID Please...

2001-06-08 Thread robert commer
I accidentally subscribed using my bigfoot account, which redirects to my yahoo account, so when I unsubscribe as you described below, I get a confirmation request on my yahoo account - since bigfoot is just a redirec account. Therefore, there is no way for me to go into my nonexistent bigfoot ac

RE: using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
> Oops ... too much paste ... sorry John. does not compute? Al

RE: using modules installed in local CGI bin

2001-06-08 Thread Curtis Poe
> if ($#path > 0) > @paths=split /:/, $ENV{$key}; Should be if ($#path > 0) { @paths=split /:/, $ENV{$key}; } Your content type should be (space after the colon) print "Content-Type: text/html\n\n"; --- Al Hospers <[EMAIL PROTECTED]> wrote: > is this correct? >

RE: using modules installed in local CGI bin

2001-06-08 Thread Moon, John
Oops ... too much paste ... John W Moon -Original Message- From: Al Hospers [mailto:[EMAIL PROTECTED]] Sent: June 08, 2001 15:57 To: [EMAIL PROTECTED] Subject: RE: using modules installed in local CGI bin is this correct? #!/usr/local/bin/perl print "Content-Type:text/html\n\n"; print

RE: using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
> Did you just copy the FTP.pm file into this area, or did you > actually do > the install? i.e., something like > > perl Makefile.PL prefix=/myinstall/directory > make > make test > make install I did perl Makefile.PL but not the perfix... stuff. perhaps I should remove it all, copy it up again

RE: using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
is this correct? #!/usr/local/bin/perl print "Content-Type:text/html\n\n"; print 0) @paths=split /:/, $ENV{$key}; if

Re: comparing date values

2001-06-08 Thread Curtis Poe
--- Brian Hersey <[EMAIL PROTECTED]> wrote: > my $presesntdate = (localtime); my ( $day, $month, $year ) = (localtime)[3..5]; $month++; # assume you want 1-12 instead of 0-11 $year += 1900; > 2. How do I compare the date values, so that I can get a numerical value of > days since the

Re: comparing date values

2001-06-08 Thread Justin Simoni
try something like this: my ($sec, $min, $hour, $day, $month, $year) = (localtime)[0,1,2,3,4,5]; $year = $year+1900; $month = $month+1; Perl has quite a few modules to fiddle around with dates a bit more cleaner and much more sophisticated than this, but this may be all you need, localtime()

comparing date values

2001-06-08 Thread Brian Hersey
Hi All, OK, I'm REALLY new to Perl, and programming in general (I know, *sigh*) but I have what should be a pretty simple question. I'm trying to make a logon feature for a site that would compare 2 dates, one in a MySQL database of when a user has registered with a service and the present date

Re: tutorial proposition (was: Re: Succinct Code, Use of my $var and global vs local)

2001-06-08 Thread Mark Rowlands
On Thursday 07 June 2001 08:02, fliptop wrote: > Teresa Raymond wrote: > > This snippet of code works as it is but I was wondering if there was > > a way to rewrite it more succinctly. I am also not using my $var="" > > after a few days of reading the code samples being posted here, i have > been

RE: using modules installed in local CGI bin

2001-06-08 Thread Timothy Kimball
Al Hospers wrote: : I changed the setup to : : #!/usr/local/bin/perl : use CGI qw(:all); : use lib "./libnet"; : use Net::FTP; : print header; : ... : now I get this error : : BEGIN failed--compilation aborted at weather_ftp.cgi line 4. I presume this is from the server's error_log. Is th

RE: using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
OK, I changed the setup to #!/usr/local/bin/perl use CGI qw(:all); use lib "./libnet"; use Net::FTP; print header; originally this was the error I got: BEGIN failed--compilation aborted at weather_ftp.cgi line 4. vde$ perl weather_ftp.cgi Can't locate Net/FTP.pm in @INC (@INC contains: ./

Re: using modules installed in local CGI bin

2001-06-08 Thread Timothy Kimball
: use line "./libnet"; sorry, that should be use lib "./libnet"; -- tdk

Re: using modules installed in local CGI bin

2001-06-08 Thread Timothy Kimball
Al Hospers wrote: : ... HOWEVER, I cannot get my : script to find the modules. : : here's the initial part of the code. according to the error message it fails : on line 4 where it cannot find the Net::FTP module. : : #!/usr/local/bin/perl : use CGI qw(:all); : use lib "/libnet/Net"; : use

RE: using modules installed in local CGI bin

2001-06-08 Thread Moon, John
Try using BEGIN { $ENV{PATH}.="../libnet/net"; } You may wish to print your "path" and other environment variables just to see what you are getting when you enter Perl... #!/usr/local/bin/perl5.00502 print "Content-Type:text/html\n\n"; print

using modules installed in local CGI bin

2001-06-08 Thread Al Hospers
hi, I have a project that I am working on that I need to FTP some data from a server to another server. I used Net::FTP from libnet to do it. I tested it on my local machine & it works fine, did the job. however when tried it on my site I found out that libnet was not installed. contacting the h

LWP

2001-06-08 Thread Stout, Joel R
Hiya, I just started running some Perl CGI scripts. Very cool. Although I have run some scripts, I'm running into a problem both with an example in the CookBook and with a script given to me. Both use LWP so I'm thinking that I'm missing a module or something. I have the basic Active State

RE: perl question

2001-06-08 Thread Kris Cook
There is more than one way to do anything. In fact, there are still more ways to do this than you've shown. As I pointed out earlier (in response to the "Erratic server errors..." thread), which method you choose should depend on the depth and breadth of your audience. If it's a room full of ne

perl question

2001-06-08 Thread David Draley
what is the difference between print qq| |; vs. the print "\n"; print "\n"; print "\n"; print "\n"; vs. the print <<"EndOfText"; http://explorer.msn.com

RE: Erratic server errors apparently caused by missing header.

2001-06-08 Thread Kris Cook
While I agree with the fact that it's hard to screw up the headers when you use the function interfaces of CGI.pm, I guess I'm just a little anal about clarity, and true clarity means that you shouldn;t have to know a lot about the behind-the-scenes interfaces in order to know precisely what the p

Re: subroutine problem...

2001-06-08 Thread Curtis Poe
--- Jeremy Gray <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm only a couple days into learning perl here.. but I've been having this > problem with subroutines I can't seem to figure out. Could someone explain > what I'm doing wrong here: > > require "cgi-lib.pl"; Please don't use cgi-lib.pl.

Re: difference between perl & mod_perl

2001-06-08 Thread Brett W. McCoy
On Fri, 8 Jun 2001, [iso-8859-1] Vontel Girish wrote: > I want to know what is the difference between perl and > mod_perl What do you mean by 'difference'? mod_perl is Perl, but it is an Apache module that enables one to create high-performance CGI scripts by embedding a Perl interpreter in

AW: AW: problems whit Win32::OLE

2001-06-08 Thread Sage, Christian
Argenis, to me that looks like you didn't import the module. Sorry, I had forgotten to mention that: in order to be able to load the constants you would have to say use Win32::OLE::Const; somewhere near the start of your program. After that the error message should go away (and hopefully not

Re: inserting line breaks in a string

2001-06-08 Thread Hasanuddin Tamir
On Fri, 8 Jun 2001, Hasanuddin Tamir <[EMAIL PROTECTED]> wrote, > On Fri, 8 Jun 2001, Aaron Craig <[EMAIL PROTECTED]> wrote, > > > At 11:42 07.06.2001 -0400, you wrote: > > >I have a problem with an HTML form. I am collecting in put from a html > > >textarea box, then displaying it to the scream

Re: INSERTing problems

2001-06-08 Thread Randal L. Schwartz
> "Jeff" == Jeff Yoak <[EMAIL PROTECTED]> writes: Jeff> I'm coming in on the middle of a thread here, but generally the best Jeff> thing to do when working with databases in Perl is to us DBI, and if Jeff> you are doing that, database handles have a method called quote() that Jeff> will ensur

Re: inserting line breaks in a string

2001-06-08 Thread Hasanuddin Tamir
On Fri, 8 Jun 2001, Aaron Craig <[EMAIL PROTECTED]> wrote, > At 11:42 07.06.2001 -0400, you wrote: > >I have a problem with an HTML form. I am collecting in put from a html > >textarea box, then displaying it to the scream on the next page. the > >problem is that the whole string is being displa

Re: change my ID Please...

2001-06-08 Thread Lucy
If you go to http://learn.perl.org/ put your old email in the maillinglists box on the right and check all the lists you have subscribed to, and then the unsubscribe box. Follow the details sent to you current email address, then resubscribe with your new email using the web form again, if yo

AW: problems whit Win32::OLE

2001-06-08 Thread Sage, Christian
Argenis, having no experience whatsoever with Reflection I can't really say, but I would guess you would need to gather the constant value definitions from the COM server into a hash first and use those afterwards. At least that's what I find I have to do when controlling MS Excel through OLE.

Re: subroutine problem...

2001-06-08 Thread Jeremy Gray
> >doStore(); > >without the & > >Geraint. That doesnt seem to work either. Maybe I dont understand what all I'm supposed to do. if ( $in{'agree'} ne "" ) { doStore(); &doRedirect; } else { &doSorryYoung; } See.. I just want it to run doStore, then run doRedirect. So should I call both

Re: inserting line breaks in a string

2001-06-08 Thread Aaron Craig
At 11:42 07.06.2001 -0400, you wrote: >I have a problem with an HTML form. I am collecting in put from a html >textarea box, then displaying it to the scream on the next page. the >problem is that the whole string is being displayed all on one line I want >no more than 50 characters to display on

Re: subroutine problem...

2001-06-08 Thread Geraint Jones
Try: doStore(); without the & Geraint.

Re: change my ID Please...

2001-06-08 Thread Geraint Jones
On Saturday 09 June 2001 5:48 am, you wrote: > Hi i subscribed to all of the mailing lists at learn.perl.org. > Unfortunately there are about 200 Mails i recieve daily only from > perl.org's subscriptions. But i like them all. I never felt bad. But the > problem is there are some urgent personal

subroutine problem...

2001-06-08 Thread Jeremy Gray
Hi, I'm only a couple days into learning perl here.. but I've been having this problem with subroutines I can't seem to figure out. Could someone explain what I'm doing wrong here: #!/usr/bin/perl require "cgi-lib.pl"; require "ctime.pl"; $date = &ctime(time); chop($date); $datafile=">>harv

Re: shared drive directory listing in cgi

2001-06-08 Thread Jeff Yoak
Hi there. You're using a platform with which I have very little experience, but here are two guesses: Is the network drive mapped the same way in the environment that the webserver uses? On UNIX systems, it is common to find that things work differently when running from cron or a webserver

Re: INSERTing problems

2001-06-08 Thread Jeff Yoak
At 09:07 AM 6/8/01 +0100, Liz Keogh wrote: >For my own personal curiosity; > >Would you have to somehow protect the apostrophe in something >like "Kelly's Trucking" before putting it into an SQL string? I'm coming in on the middle of a thread here, but generally the best thing to do when working

Re: INSERTing problems

2001-06-08 Thread Liz Keogh
For my own personal curiosity; Would you have to somehow protect the apostrophe in something like "Kelly's Trucking" before putting it into an SQL string? I've not done a great deal of Perl, but with VB we always stripped the apostrophes out before putting variables into SQL statements. Cheer

Re: File writing question

2001-06-08 Thread Jeff Yoak
At 06:02 PM 6/6/01 -0700, Kristina wrote: >Hi. I'm trying to get a better handle on writing to files and checking >input better before I do. :) My question is, if I arbitrarily decide that >I will not allow any filenames that have non-word characters in them, and >if I have the directory path to

difference between perl & mod_perl

2001-06-08 Thread Vontel Girish
I want to know what is the difference between perl and mod_perl Thanks, Vontel Girish = V.GIRISH 5/29, White Street, Southport, Gold Coast, QLD 4215, AUSTRALIA Cell: +61 414510375 home: +61 7 5528 0794 Do You Yahoo!? For regula

Re: difference between perl & mod_perl

2001-06-08 Thread Jeff Yoak
At 06:07 AM 6/8/01 +0100, Vontel Girish wrote: >I want to know what is the difference between perl and >mod_perl Perl is a general purpose programming language. mod_perl is an Apache module for implementing dynamic web content. Using mod_perl for your dynamic web content, you'll write you