Re: A good book?

2001-06-04 Thread Geraint Jones
On Saturday 02 June 2001  6:15 am, you wrote: > Hi, > > I just finished taking a 2 day training class on Perl and would like to > learn more about the language. Is there a book that you all swear by >that helped you figure out the impossible? > > Much appreciated. > > Hager I would suggest you bu

Re: problem

2001-06-04 Thread Ãèªá¤ô¤ë
Well. Actually, I don't know what your code is meaning deep... but from the expected results, I suggest you may write in this way : #!/usr/bin/perl # name this script as "thisscript.pl", for example. $query = $ENV{QUERY_STRING}; if ($query eq "") {$query = 1}; # Set default page if user

Re: A good book?

2001-06-04 Thread Richard Hulse
The CD Book shelf has just been updated to include the 3rd edition of "Programming Perl". Don't let anyone sell you the old edition! best regards, Richard At 10:20 4/06/2001 +0100, you wrote: >I would suggest you buy "The Perl CD Bookshelf" from O'Reilly. You get >the "Perl in a Nutshell" boo

Re: A good book?

2001-06-04 Thread Geraint Jones
On Monday 04 June 2001 11:58 am, you wrote: > The CD Book shelf has just been updated to include the 3rd edition of > "Programming Perl". > > Don't let anyone sell you the old edition! > > best regards, > > Richard Damn! I bought the bookshelf before it was updated. I wish you could upgrade book

RE:

2001-06-04 Thread Savin, Jill
** Jill Savin Web Content Developer Mentor Technologies Group, Inc. 133 National Business Parkway Annapolis Junction, Maryland 20701 phone: toll-free: 1-877-430-2463 ext 7258 phone: local: 240-568-6500 ext. 7258 fax: 240-568-6518

Re: A good book?

2001-06-04 Thread Randal L. Schwartz
> "Richard" == Richard Hulse <[EMAIL PROTECTED]> writes: Richard> The CD Book shelf has just been updated to include the 3rd edition of Richard> "Programming Perl". And unfortunately no longer contains Learning Perl because of a timing issue (Learning Perl 3rd was about to come out, but wasn

Perl books

2001-06-04 Thread Nigel G Romeril
I would recommend Learning Perl to get into the language and then Programming Perl and the Perl Cookbook as key references. You will probably want something on CGI or whatever is your particular specialism as well, but these will get you off the ground.

Re: A good book?

2001-06-04 Thread iain truskett
* Richard Hulse ([EMAIL PROTECTED]) [04 Jun 2001 11:03]: > The CD Book shelf has just been updated to include the 3rd edition of > "Programming Perl". > Don't let anyone sell you the old edition! Note that Version 2.0 also contains "Perl for System Administration". For more information, see: ht

Re: A good book? Upgrade

2001-06-04 Thread David Gilden
from : Oreilly, We do have an Upgrade Policy, I'm happy to say. :) You may read about it at http://www.oreilly.com/order/upgrade.html . (http://www.oreilly.com/catalog/pperl3/desc.html) has written: "This third edition of Programming Perl has been expanded to cover version 5.6 of this maturi

Re: Session.pm

2001-06-04 Thread William McKee
Michael, The error message indicates that Perl cannot find the Session.pm module. Be sure you have installed the module properly. If you have to install it locally on an ISP, then you'll need to add: use lib '/path/to/your/modules/'; Hope this helps, William On 3 Jun 2001, at 19:38, M

RE: A good book?

2001-06-04 Thread Chris Lott
> Is there a book that you all > swear by that > helped you figure out the impossible? Personally, I think _Learning Perl_ is really showing its age. It is OK, but better for beginners is Simon Cozens book _Beginning Perl Programming_ from Wrox, which covers more, I found easier to digest, and i

Re: Perl books

2001-06-04 Thread Curtis Poe
--- Nigel G Romeril <[EMAIL PROTECTED]> wrote: > You will probably want something on CGI or whatever is your > particular specialism... A good book on CGI programming can be invaluable. A bad book on CGI programming can be disastrous. I'd recommend Writing CGI Applications with Perl by Addison

Re: Session.pm

2001-06-04 Thread William McKee
Michael, The error message indicates that Perl cannot find the Session.pm module. Be sure you have installed the module properly. If you have to install it locally on an ISP, then you'll need to add: use lib '/path/to/your/modules/'; Hope this helps, William On 3 Jun 2001, at 19:38, Michael C

testing null strings for form field values

2001-06-04 Thread charles
if ( $formdata{view_name} ne "" ) { $view = $formdata{view_name}; $viewtag = "1"; } is there a special method for testing against a null string for a form field's value? i am using the above data, but it seems to always return with a value of "1" making me think that something is incorrect in

Re: Session.pm

2001-06-04 Thread Michael Chopek
Hi William; On Mon, 04 Jun 2001, William McKee scribed: > The error message indicates that Perl cannot find the Session.pm > module. Be sure you have installed the module properly. If you have to > install it locally on an ISP, then you'll need to add: > use lib '/path/to/your/modules/'; Than

Re: testing null strings for form field values

2001-06-04 Thread Brett W. McCoy
On Mon, 4 Jun 2001 [EMAIL PROTECTED] wrote: > if ( $formdata{view_name} ne "" ) { > $view = $formdata{view_name}; > $viewtag = "1"; > } > > is there a special method for testing against a null string for a form > field's value? i am using the above data, but it seems to always return > with a

Limiting access to cgi scripts

2001-06-04 Thread Kurt Edmiston
Hi, I want to limit access to one of my scripts. I have a list of web pages that are authorized to call my script, and I want to disable the script if another unauthorized page calls it. My code to do this looks like the following: my $referer = $ENV{HTTP_REFERER}; my $legal_re

Re: Limiting access to cgi scripts

2001-06-04 Thread Mathew Hennessy
Kurt Edmiston wrote: > > Hi, I want to limit access to one of my scripts. I have a list of web > pages that are authorized to call my script, and I want to disable the > script if another unauthorized page calls it. My code to do this looks > like the following: > > my $referer = $ENV{H

Re: testing null strings for form field values

2001-06-04 Thread David Labatte
Yes, that very well might return 1. If you are getting the form variable data from cgi.pm then a blank form field will appear as an undefined value in perl, not an empty string. So the previous posters response about testing for the true'ness of the form value will work always and is how I usu

Re: Limiting access to cgi scripts

2001-06-04 Thread Brett W. McCoy
On Mon, 4 Jun 2001, Kurt Edmiston wrote: > Hi, I want to limit access to one of my scripts. I have a list of web > pages that are authorized to call my script, and I want to disable the > script if another unauthorized page calls it. My code to do this looks > like the following: > > > my

netscape won't read as html

2001-06-04 Thread charles
hello, i am trying to print out some html in my script and IE and Opera both display the html properly, however netscape will actually display the html as if it were a text doc. i would assume that something would be incorrect in my content-type, but i just don't see it. thanks -charles #!/usr/b

Re: testing null strings for form field values

2001-06-04 Thread Randal L. Schwartz
> "David" == David Labatte <[EMAIL PROTECTED]> writes: David> The why though is most likely that: undef ne '' That's not true. undef eq ''. David> What I usually do if I have code that expects an empty string David> instead of an undef is append an empty string onto it when I read David> t

Re: Limiting access to cgi scripts

2001-06-04 Thread Randal L. Schwartz
> "Kurt" == Kurt Edmiston <[EMAIL PROTECTED]> writes: Kurt> my $referer = $ENV{HTTP_REFERER}; No. Trivially forged, stripped by many security proxies and caches. Interesting as a logged item or a hint, however. Try something else. -- Randal L. Schwartz - Stonehenge Consulting Serv

Re: testing null strings for form field values

2001-06-04 Thread Hasanuddin Tamir
On Mon, 4 Jun 2001, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote, > if ( $formdata{view_name} ne "" ) { > $view = $formdata{view_name}; > $viewtag = "1"; > } > > is there a special method for testing against a null string for a form > field's value? i am using the above data, but it seems to a

Re: netscape won't read as html

2001-06-04 Thread Abdulaziz Ghuloum
On Mon, 4 Jun 2001 13:10:45 -0500 (CDT), <[EMAIL PROTECTED]> said: > hello, > i am trying to print out some html in my script and IE and Opera both > display the html properly, however netscape will actually display the html > as if it were a text doc. i would assume that something would be i

Re: testing null strings for form field values

2001-06-04 Thread charles
honestly, i havent even covered use::strict in my readings yet. i am brand spanking new to the language, however i am indeed running perl with -w. -cjm On Tue, 5 Jun 2001, Hasanuddin Tamir wrote: > On Mon, 4 Jun 2001, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote, > > > if ( $formdata{view_name

Re: testing null strings for form field values

2001-06-04 Thread Hasanuddin Tamir
On Tue, 5 Jun 2001, Hasanuddin Tamir <[EMAIL PROTECTED]> wrote, > Date: Tue, 5 Jun 2001 01:22:59 +0700 (JAVT) > Take a look at these one-liner examples. The string "(nothing)" indicates > that no output is printed. > > 1% perl -le '$x; print 1 if $x ne ""' > (nothing) > > 2% perl -le '$x = und

summary: a good perl book

2001-06-04 Thread Hager Ben-Mahmoud
Hi folks, I got so many answers (Thanks!) that I thought I'd compile them all and send them to the list in case someone needed the info. ** A good book on CGI programming can be invaluable. A bad book on CGI programming can be disastrous. I'

Re: netscape won't read as html

2001-06-04 Thread Curtis Poe
--- [EMAIL PROTECTED] wrote: > hello, > i am trying to print out some html in my script and IE and Opera both > display the html properly, however netscape will actually display the html > as if it were a text doc. i would assume that something would be incorrect > in my content-type, but i just d

if statement printing when it shouldnt :)

2001-06-04 Thread charles
i currently have a form that is generated by the perl script panel.pl within the html, i have: http://localhost/cgi-bin/panel.pl"; method="post"> View the Current List of Aliases also in the html, i have: if ($formdata{view_name}) { $view = $formdata{view_name}; $viewtag = "1"; } and

Re: testing null strings for form field values

2001-06-04 Thread David Labatte
Randal is of course right. I apologize for my extremely confusing and idiom riddled post. "Randal L. Schwartz" wrote: > > "David" == David Labatte <[EMAIL PROTECTED]> writes: > > David> The why though is most likely that: undef ne '' > > That's not true. undef eq ''. > Sorry I meant that

Re: if statement printing when it shouldnt :)

2001-06-04 Thread Timothy Kimball
[EMAIL PROTECTED] wrote: : if ( $viewtag = "1" ) { : print "The value of \$view was $view\n"; : } : : i would have thought that the second statement would not print since the : form had not been "submitted". however, instead, the if statements' print : does get stuck into the html. A pernicio

Re: if statement printing when it shouldnt :)

2001-06-04 Thread Randal L. Schwartz
> "You" == <[EMAIL PROTECTED]> writes: You> if ( $viewtag = "1" ) { You> print "The value of \$view was $view\n"; You> } That will print all the time. You are assigning 1 to $viewtag, and that's always true. Maybe you wanted == instead of =? -- Randal L. Schwartz - Stonehenge Consult

Re: if statement printing when it shouldnt :)

2001-06-04 Thread Curtis Poe
> if ( $viewtag = "1" ) { > print "The value of \$view was $view\n"; > } There are a few problems with that. First, you generally want a double equals '==' with a numeric comparison. You are assigning the value of "1" to $viewtag with returns "1" as the result which automatically evaluates

RE: testing null strings for form field values

2001-06-04 Thread Savin, Jill
** Jill Savin Web Content Developer Mentor Technologies Group, Inc. 133 National Business Parkway Annapolis Junction, Maryland 20701 phone: toll-free: 1-877-430-2463 ext 7258 phone: local: 240-568-6500 ext. 7258 fax: 240-568-6518

Re: problem

2001-06-04 Thread Ãèªá¤ô¤ë
I think you may try to use : print "Content-type: text/html\n\n"; print "..."; print "other statements"; - Original Message - From: Derek Duhon <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 03, 2001 11:29 AM Subject: problem I have a print statement that pr

Re: using fork() in CGI script

2001-06-04 Thread Mike Miller
Ok, I didn't get any replies, but I finally figured it out. When forking off a process, I simply closed STDOUT in the child. When the parent exited, the browser quit loading. WOO HOO! -Mike Earlier, I wrote: > > All: > > I have a CGI script which forks off a new process to perform lengthy >

Re: problem

2001-06-04 Thread Bill Wood
Derek, I think your best solution is to use print qq(.); instead of print "."; print (Content-type: text/html\n\nEndless!$currentPrevious Page | Next Page); >- Original Message - >From: Derek Duhon <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Sunday, June 03, 2001 11:2

RE: problem

2001-06-04 Thread Moon, John
Derek, Have you tried: print "...", "...", "..."; When writing html I try to make it as easy as I can to read ... later. Also I like the use the cgi modules to print "standard" html entries... again, for readability ... or a "here" document (ref. Chapter 2, Terms in the Ca

REPOST: Regex compilation in mod_perl?

2001-06-04 Thread Len Walter
Hi all, I'm trying to write a script to retrieve a list of URLs, search them for a list of words and print the results. I wrote it first as a standalone script and got it working, but when I converted it to a web page it no longer works properly. The data is typed into two TEXTAREAs, one url

Re: i'm warning you, this is a toughie!

2001-06-04 Thread Mathew Hennessy
Nichole Bialczyk wrote: > > The problem is that I don't know exactly what the problem is. I can write > to the logfile when I run it in Unix, but not when I try to access it > from the web. He says that it is more secure to write to our server than > it is to write to afs. But I can't make it wor

Re: testing null strings for form field values

2001-06-04 Thread Mathew Hennessy
[EMAIL PROTECTED] wrote: > > if ( $formdata{view_name} ne "" ) { > $view = $formdata{view_name}; > $viewtag = "1"; > } > > is there a special method for testing against a null string for a form > field's value? i am using the above data, but it seems to always return exists() will t