beginner's addressbook tutorial - introduction

2001-06-07 Thread fliptop
the introduction is complete, and is available at http://www.peacecomputers.com/addressbook_toot-intro.html coming next - step 1, analyzing the project.

change my ID Please...

2001-06-07 Thread sanjeev
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 messages for me which i need to reply soon but due

RE: Email on Windows Platform

2001-06-07 Thread Frank J. Schmuck
Herb, If I turn on "strict" the code aborts due to the errors mentioned above. If I turn off "strict" then the e-mail is sent but I receive the message "the system can not find the path specified." -Original Message- From: Herb Hall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 06, 2

RE: Email on Windows Platform

2001-06-07 Thread Frank J. Schmuck
Herb, I tried you code and received errors: Global symbol "$smtp" requires explicit package name at test1.pl line 6. Global symbol "$smtp" requires explicit package name at test1.pl line 7. Global symbol "$smtp" requires explicit package name at test1.pl line 8. Global symbol "$smtp" requires ex

Re: Decimal To Binary

2001-06-07 Thread Randal L. Schwartz
> "Moon," == Moon, John <[EMAIL PROTECTED]> writes: Moon,> Please read about "$_" ... IT is the "default" for the "shift" function ... No. In a subroutine, @_ is the default for shift, and outside a subroutine, @ARGV is the default. -- Randal L. Schwartz - Stonehenge Consulting Services,

RE: Decimal To Binary

2001-06-07 Thread Moon, John
Please read about "$_" ... IT is the "default" for the "shift" function ... Perl tries to help ... The Camel has a good discussion on subroutines (ref. Ch 2 "Subroutines" ) ... also see Ch 2 "Global Special Variables" Before I coded any Perl I found the Llama book very helpful and found myself

Remove from mailing list

2001-06-07 Thread MRatRVFFCU
REMOVE

RE: Decimal To Binary

2001-06-07 Thread SEIP,CHRISTOPHER (HP-Roseville,ex1)
Hello, It's the "shift". In the sub, "shift" is grabbing an argument (the number being passed in). Outside of the sub ... well, it's not doing what you expect. Looks like you want pack() to operate on the value of $str. So, try substituting $str for that "shift", i.e.: $str = unpack("B32"

Re: INSERTing problems

2001-06-07 Thread David Labatte
It's been some time since I've done any access programming but the error your getting is consistent with using a reserved world for a table or field name. According to the below reference from Microsoft's site the world 'Full' is a indeed a reserved word in access and could be the cause of your p

Remove From mailing List

2001-06-07 Thread Freeman, Sean
REMOVE

Decimal To Binary

2001-06-07 Thread Hassan Eshtiaghi [Nick]
The following sub is in the Perl Cookbook, section 2.4.1(Converting Between Binary and Decimal). When I call the sub I get the correct output, but if I use the same unpack and pack functions as stand-alone statements, outside a sub, the output is always 0(zero). What am missing? sub dec2bin {

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

2001-06-07 Thread mcrawley
Without question! -- Original Message -- From: "William McKee" <[EMAIL PROTECTED]> Date: Thu, 7 Jun 2001 09:48:54 -0400 >On 7 Jun 2001, at 2:02, fliptop wrote: >> does anyone feel this would be helpful? i'd put in the time only if >> other beginners though

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread john mckeown
very strange. my copy of netscape 4.77 (as well as my copy of IE 5) correctly give the url of the referring page in HTTP_REFERER. by the way, this variable is not suitable for authentication, as it can easily be spoofed. just a warning, ymmv. * Dianne Van Dulken <[EMAIL PROTECTED]> [2001-06-0

File writing question

2001-06-07 Thread Kristina
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 these files set in the script itself as in:

Lists (managing them)

2001-06-07 Thread BATTERSBY CATHERINE
I am just starting to learn about list management. The one I have been tasked to work on is majordomo, are there any tips from anyone out there on how to get started??? I would really appreciate this. Thanks, Catherine

Various suggestions

2001-06-07 Thread David Williams
Thank you all for your comments. Thus far, I have still not been able to get my new data into my table. I tried all of your suggestions, but they all result in the more or less the same as mine did. No new data ended up in my table. I know I'm on the right track though because if I limit my

Re: Perl & the web

2001-06-07 Thread Gabriel Presas
check out www.masonhq.com mason mixes perl and html very nicely. G - Original Message - From: "Fco. Javier Valladolid Hdez." <[EMAIL PROTECTED]> To: "Sally" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 07, 2001 2:13 AM Subject: RE: Perl & the web

shared drive directory listing in cgi

2001-06-07 Thread Swalve, Lane
Hello all- I am trying to get a directory listing of a mapped network drive using perl. When I use the code I have in a perlscript it works fine. however when I put the same lines in a perlscript that is a cgi script it does not work. Any ideas why? here are the lines I used $c=opendir(Dir,"//I

RE: Email on Windows Platform

2001-06-07 Thread Herb Hall
I have had great success with Net::smtp. I also converted Matt Wrights ever popular FormMail.pl to use this module. Here is a small sample of how Net::smtp works: use Net::SMTP; $smtp = Net::SMTP->new('mail.cyber-quest.com'); # Change this to your mail server $smtp->mail(

RE: INSERTing problems

2001-06-07 Thread Moon, John
I have been very successful using Perl's debug feature ... I use this for both CGI programs and "normal" Perl scripts... I always test my cgi programs out on the Unix until I get the expected results THEN go to the browser ... For DBI I usually code my "selects/inserts/updates" as separa

Re: Erratic server errors apparently caused by missing header.

2001-06-07 Thread William McKee
Peter, Yes, using the 'print header' from CGI.pm is a good idea. However, if you send any output to the browser _before_ issuing this command, you'll continue to see the errors you described. Be sure to look for any statements which would cause ouput to go to the browser before you send the h

INSERTing problems

2001-06-07 Thread SAWMaster
Curtis Poe said: >As for your code problem, after instantiating a DBI object, try adding the following line of code: >DBI->trace( 2, 'errors.txt' ); >From the documentation: >DBI->trace($trace_level) >DBI->trace($trace_level, $trace_filename) >DBI trace information can be enabled for all hand

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Brett W. McCoy
On Thu, 7 Jun 2001, Luinrandir Hernson wrote: > anycare to help get this working. > it is being called from a homepage as the page loads (like a counter would be used) > > #!/usr/bin/perl -w > use strict; > use diagnostics; This is all good. > print "Content-type: text/html\n\n"; > > ##

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Luinrandir Hernson
anycare to help get this working. it is being called from a homepage as the page loads (like a counter would be used) #!/usr/bin/perl -w use strict; use diagnostics; print "Content-type: text/html\n\n"; ## ##declared variables ## my $homepage; my $ENV; my $HTTP_REFERER;

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Luinrandir Hernson
This works print qq{$_ => $ENV{$_}\n} for keys %ENV; what are ths individual calls? print qq"$ENV{'HTTP_REFERER'}\n"; (below are the other calls.yes???) QUERY_STRING => SERVER_ADDR => 000.00.00.000 HTTP_ACCEPT_LANGUAGE => en-us SERVER_PROTOCOL => HTTP/1.1 HTTP_CONNECTION => Keep-Alive

problems whit Win32::OLE

2001-06-07 Thread Argenis Perez
Hi my friends I have a problem calling a method in a Connectio whit reflection from IBM here is the code #!c:/perl/bin/perl.exe #use strict; use Fcntl; use SDBM_File; use Win32::OLE qw(EVENTS); use CGI qw(:standard) ; my $Quit; tie my %adb, 'SDBM_File', 'adb', O_RDWR|O_

Re: Erratic server errors apparently caused by missing header.

2001-06-07 Thread Peter Cline
Indeed this is what I opted to do after receiving the same suggestion from another. I've always use the CGI.pm module, but have always used it to extract data from forms using the param method. I had never used it to generate headers or html. I will certainly do so from now on since it seem

Re: Erratic server errors apparently caused by missing header.

2001-06-07 Thread Curtis Poe
--- Peter Cline <[EMAIL PROTECTED]> wrote: > print "Content-type : text/html \n\n"; I'm not sure if the above line is the issue or not. How the browser or Web server deals with that could be the issue (though it sounds like your problem is on the server side). A proper content type header is

Weekly list FAQ posting

2001-06-07 Thread casey
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 addr

Erratic server errors apparently caused by missing header.

2001-06-07 Thread Peter Cline
Greetings list peoples, I was not sure whether or not this is an issue dealing exclusively with cgi i(thought certainly it must be a factor) so I have taken the liberty of sending this to both lists. Here is my (to my mind) very perplexing problem. I have a collection of CGIs that all use a m

Re: DBI and Win32::ODBC

2001-06-07 Thread Curtis Poe
--- SAWMaster <[EMAIL PROTECTED]> wrote: > Can someone clear this up for me? > > Is DBI some sort of implementation of Win32::ODBC or is it an entity in and of >itself? DBI.pm (DataBase Interface) is a generic wrapper around the various DBD (DataBase Driver) modules that are available. DBI i

Re: Succinct Code

2001-06-07 Thread Curtis Poe
--- Teresa Raymond <[EMAIL PROTECTED]> wrote: > Any thoughts on how to make this code more succinct? There are a variety of things that could be done to clear this up. I'll just focus on the concept of "not repeating yourself". Consider the following 60 lines from your code: > if ($location=~

DBI and Win32::ODBC

2001-06-07 Thread SAWMaster
Can someone clear this up for me? Is DBI some sort of implementation of Win32::ODBC or is it an entity in and of itself? The reason I ask is because Brett said this: "I was going to suggest that also, but I think they were using Win32::ODBC, which I don't believe supports placeholders." I am u

inserting line breaks in a string

2001-06-07 Thread David Moore Jr.
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 each line. And only if the string is

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Randal L. Schwartz
> "Mo" == Mo Holkar / UKG <[EMAIL PROTECTED]> writes: Mo> I've seen a few references to this spoofing of HTTP_REFERER -- how is Mo> it accomplished? Mo> (Asking not so that I can do it myself ;-) but to ascertain whether Mo> the circumstances / requirements are such that this danger is of Mo

RE: $ENV(HTTP_REFERER)?

2001-06-07 Thread Mo Holkar / UKG
At 10:18 07/06/01, Aaron Craig wrote: >remote_host is not the same as HTTP_REFERRER, is it? -- http referral is >the address of the server where the page lives that the person clicked on >to arrive to the cgi script. It should also be treated with a grain of >salt, as the information it provid

Re: the ENV command? parameter?

2001-06-07 Thread Aaron Craig
> > > > I am trying to learn PERL and decipher some code somone else wrote. I have > > the code snip -- $ENV{'QUERY_STRING'} -- > > I have not found this in the archives, so I am hoping someone will answer > > this: > > > > I cannot figure out exaclty what the ENV is.The book says it contains the

Re: perl compiler and editor for windows

2001-06-07 Thread Aaron Craig
At 07:14 07.06.2001 -0500, you wrote: > >Help me I have been desperatly looking for a compiler and editing program > >for windows that is free. Please help me! > >"Order your full license for just $30" > >I don't think that qualifies as free... I am now on day 135 of my 30 day trial period, stil

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Randal L. Schwartz
> "Joe" == Joe Schulman <[EMAIL PROTECTED]> writes: >> print A "$ENV{'HTTP_REFERRER'}\n"; Joe> I'm no where near being an expert at perl (and know even less about the rules for file I/O), but I'm pretty sure two things could be Joe> wrong here: Joe> 1) The "$ENV{'HTTP_REFERRER')\n"; part fo

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

2001-06-07 Thread William McKee
On 7 Jun 2001, at 2:02, fliptop wrote: > does anyone feel this would be helpful? i'd put in the time only if > other beginners thought it would be of use. Absolutely! William

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

2001-06-07 Thread fliptop
Josh wrote: > > ditto > On Thu, 7 Jun 2001, Frank J. Schmuck wrote: > > > That would help a great deal. As a lurker (mostly to view code and to see > > how folks think through problems) and definitely a true "beginner," one > > thing that is very obvious is that there is a significant variance

Re: This n' that

2001-06-07 Thread William McKee
On 6 Jun 2001, at 14:44, SAWMaster wrote: > So now I'm playing with this line...I think it's where my error is. > $sqlstatement = "INSERT INTO Full (freq, loc, desc, freqtype, cat, call, > tx) VALUES ($newfreq, $newloc, $newdesc, $newfreqtype, $newcat, $newcall, > $newtx)"; > Can someone set me

RE: This n' that

2001-06-07 Thread Brett W. McCoy
On Wed, 6 Jun 2001, Curtis Poe wrote: > Might I suggest that you use placeholders? It has the benefit of automatically >quoting your > values for you. Amongst other benefits, you won't have to remember to automatically >quote your > data. For example, some poorly designed Web sites will cras

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Timothy Kimball
Dianne Van Dulken wrote: : I was hoping someone would be able to give me a clue how I could find the : referer IP. If I use the Environment HTTP_REFERER, it will work in IE, but : not in Netscape. : : Does anyone know of another method that allows me to read this? Should work with Netscape; it

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

2001-06-07 Thread Frank J. Schmuck
Alan, 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. Thanks Frank -Original Message- From: Alan F. Larimer, Jr. [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 1:10 AM To: T

Re: $ENV(HTTP_REFERER)?

2001-06-07 Thread Timothy Kimball
Luinrandir Hernson wrote:: open(A,">>/home/thx-1138/cgi-bin/data/refs.htm"); : print A "$ENV{'HTTP_REFERRER'}\n"; : close (A); : : The file opens, prints a return/linefeed and closes... : : any ideas why this wont work??? : it looks correct to me from what i have read. Two thoughts: * The env

Re: perl compiler and editor for windows

2001-06-07 Thread Brent Michalski
>Help me I have been desperatly looking for a compiler and editing program >for windows that is free. Please help me! "Order your full license for just $30" I don't think that qualifies as free... Brent -Forgive me if this mail contains HTML. Lotus Notes sucks.

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

2001-06-07 Thread Josh
ditto On Thu, 7 Jun 2001, Frank J. Schmuck wrote: > That would help a great deal. As a lurker (mostly to view code and to see > how folks think through problems) and definitely a true "beginner," one > thing that is very obvious is that there is a significant variance in what > folks believe is

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

2001-06-07 Thread Frank J. Schmuck
That would help a great deal. As a lurker (mostly to view code and to see how folks think through problems) and definitely a true "beginner," one thing that is very obvious is that there is a significant variance in what folks believe is a "beginner." When I read "oh, yeah yesterday I was develo

Re: perl compiler and editor for windows

2001-06-07 Thread Aaron Craig
At 21:25 06.06.2001 -0700, you wrote: >Help me I have been desperatly looking for a compiler and editing program >for windows that is free. Please help me! EditPlus2!! We love it! http://www.editplus.com/ Aaron Craig Programming iSoftitler.com

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

2001-06-07 Thread Aaron Craig
I'm not a beginner, but that sounds like a great way to start up a discussion about efficient program development. Go for it! At 02:02 07.06.2001 -0400, you 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 su

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

2001-06-07 Thread Aaron Craig
At 22:19 06.06.2001 -0700, you wrote: > > I am also not using my $var="" > > because my cgi class did not teach me how and I haven't found the > > time to incorporate my knowledge from my recently-taken Intro to Perl > > class. Some pontification on the usage my $var="" would be great. > > As wel

Re: perl help 2!!

2001-06-07 Thread David Draley
Hello Gary – Yes, my CGI generates the form on the fly. Its like the script is run on load and processes the data immediately. Maybe my code is wrong. It’s driving me crazy! Here is my code below. thanks in advance - -- #!/usr/bin/perl #Evaluation Questions for

Re: perl help!!

2001-06-07 Thread Gary Stainburn
Hi David, I don't quite understand this one. If your script works when the form is submitted, then your server/cgi-bin/perl seem to be set up correctly. Does the same CGI generate the form and accept it back? If so, then them problem is in your CGI's logic. I do the same thing here, and ri

Re: More "Succintification"

2001-06-07 Thread Roger C Haslock
I have found the series of articles, eg http://www.oreillynet.com/pub/a/network/2001/05/18/perl_redflags.html to be most helpful for such problems - Roger - - Original Message - From: "Teresa Raymond" <[EMAIL PROTECTED]> To: "beginnerperllist" <[EMAIL PROTECTED]> Sent: Thursday, June

Re: More "Succintification"

2001-06-07 Thread Aaron Craig
At 01:23 07.06.2001 -0500, you wrote: >How can I get this code to be more readable? Thanks in advance. I would start with adding line breaks and tabs #LOOP TO INITIALIZE VARIABLES + TEST N COMMANDS FOR MATCH IS YES foreach $i (sort(@indata)) { chop($i); ($aptname,

RE: $ENV(HTTP_REFERER)?

2001-06-07 Thread Aaron Craig
At 22:35 06.06.2001 -0500, you wrote: > > I too have a question about this. > > below is the code: > > > > open(A,">>/home/thx-1138/cgi-bin/data/refs.htm"); > > print A "$ENV{'HTTP_REFERRER'}\n"; > > close (A); > > > > The file opens, prints a return/linefeed and closes... > > > > any ideas why th

More "Succintification"

2001-06-07 Thread Teresa Raymond
How can I get this code to be more readable? Thanks in advance. #LOOP TO INITIALIZE VARIABLES + TEST N COMMANDS FOR MATCH IS YES foreach $i (sort(@indata)) {chop($i); ($aptname,$address,$city,$zip,$phone,$location,$bedrooms,$rentmin,$ren tmax,$pets,$laundry,$garage,$comment,$aptweb,$aptemail,$g

Succinct Code

2001-06-07 Thread Teresa Raymond
Any thoughts on how to make this code more succinct? #PRINT OUT HTML FORM WITH VALUES FROM DATABASE foreach $i (@indata) {chop($i); ($aptname,$address,$city,$zip,$phone,$location,$bedrooms,$rentmin,$ren tmax,$pets,$laundry,$garage,$comment,$aptweb,$aptemail,$graphic)=split (/\|/,$i); if (($addr