[14037] in Perl-Users-Digest
Perl-Users Digest, Issue: 1447 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 20 18:15:33 1999
Date: Sat, 20 Nov 1999 15:15:22 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <943139722-v9-i1447@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 20 Nov 1999 Volume: 9 Number: 1447
Today's topics:
Re: Search Engine <jaimedp@pacbell.net>
Re: Search Engine (Abigail)
Re: Search Engine <flavell@mail.cern.ch>
Re: Search Engine <gellyfish@gellyfish.com>
Re: Search Engine <jaimedp@pacbell.net>
sendmail pipe <dukat@flash.net>
Re: sendmail pipe <gellyfish@gellyfish.com>
Re: sendmail pipe lee.lindley@bigfoot.com
Re: signature question (was Re: Help with Stoopid Nutsc <gellyfish@gellyfish.com>
Re: sort defaults to? (Abigail)
Re: SQL questions and Win32::ODBC <rothd@roth.REMOVE.net>
Re: SQL questions and Win32::ODBC <netanator@home.com>
Re: Tracking Form Submissions? (Abigail)
Un deletable files HELP!!! (Honey)
Re: What is a good book on Perl <gellyfish@gellyfish.com>
Re: What is a good book on Perl (Abigail)
Re: What is a good book on Perl <uri@sysarch.com>
Re: What is a good book on Perl (Abigail)
Re: What is a good book on Perl (Abigail)
Re: Wierd List Behavior (Abigail)
Re: Wierd List Behavior (Kragen Sitaker)
Re: Writing Modules (Mark-Jason Dominus)
Re: Y2K in perl <aqumsieh@matrox.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 20 Nov 1999 11:16:40 -0800
From: Jaime Perez <jaimedp@pacbell.net>
Subject: Re: Search Engine
Message-Id: <3836F398.A96D6630@pacbell.net>
Well, the code does not work because it doesn't do anything.
Try it.
The address where you can see the application is here:
http://jaime.laosb.org/cgi-bin/sitesearch.cgi
-Jaime
Kragen Sitaker wrote:
> In article <3836C36D.58A32BCD@pacbell.net>,
> Jaime Perez <jaimedp@pacbell.net> wrote:
> >Does anybody out there know how to create a search engine that would
> >search specific sites for a specific keyword?
>
> Step 1. download the contents of those sites. Be sure to obey robots.txt.
> Step 2. index it by keyword so you can find results in a reasonable amount
> of time.
> Step 3. when you get a query, look up its keywords in the keyword index.
>
> >The code is supposed to search stonehenge.com for the word the user
> >inputs.
> >The problem is that when the user inputs the stuff and submits the
> >forms, it does not work.
>
> You mean you get a 507 Doesn't Work error from the web server, and a
> Doesn't Work error in your web server error log?
>
> >I have also installed modules:
> >
> >WWW-Search-2.05
> >HTML-Parser-2.25
> >URI-1.04
> >libwww-perl-5.46
> >libnet-1.0607
> >MIME-Base64-2.11
> >Digest-MD5-2.09
>
> Good. Good start.
>
> >The program code is at: http://jaime.laosb.org/sitesearch
>
> Why don't you post the part of the code that Doesn't Work?
>
> --
> <kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
> The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
> <URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 20 Nov 1999 13:18:24 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Search Engine
Message-Id: <slrn83dt69.m2v.abigail@alexandra.delanet.com>
Jaime Perez (jaimedp@pacbell.net) wrote on MMCCLXXII September MCMXCIII
in <URL:news:3836C36D.58A32BCD@pacbell.net>:
;; Does anybody out there know how to create a search engine that would
;; search
;; specific sites for a specific keyword?
Yes, you hire a competent programmer and pay her lots.
;; Take a look at a program I saw on a magazagine called "Web Development".
;;
;; I did all the code but the program did not work.
I guess you have a bug then.
;; The program code is at: http://jaime.laosb.org/sitesearch
Lemme get this straight. You created a search engine, and all you know
is "it doesn't work", and now you want someone to debug the entire set
of code?
The mind boggles.
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sat, 20 Nov 1999 20:38:54 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Search Engine
Message-Id: <Pine.HPP.3.95a.991120203621.26446P-100000@hpplus01.cern.ch>
On Sat, 20 Nov 1999, Jaime Perez wrote:
> Well, the code does not work because it doesn't do anything.
So it really _does_ lounge around on the couch all day. It was bound to
happen, sooner or later.
Programs don't just happen, you know. They get designed, coded, and
debugged. Try it some time, like the others here do.
have fun
------------------------------
Date: 20 Nov 1999 21:37:08 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Search Engine
Message-Id: <8174a4$8nn$1@gellyfish.btinternet.com>
On Sat, 20 Nov 1999 20:38:54 +0100 Alan J. Flavell wrote:
> On Sat, 20 Nov 1999, Jaime Perez wrote:
>
>> Well, the code does not work because it doesn't do anything.
>
> So it really _does_ lounge around on the couch all day. It was bound to
> happen, sooner or later.
>
I blame the parents.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 20 Nov 1999 14:23:38 -0800
From: Jaime Perez <jaimedp@pacbell.net>
Subject: Re: Search Engine
Message-Id: <38371F6A.85A8F01A@pacbell.net>
For those of you that are not helping me with the program, I would
appreciate it if you kept
your comments to yourselves. I am a programmer!
If I am using this list is because I thought lists like this are supposed to
be helpful sources not places to
start fights or redicule or mock people on the questions they post, in this
case me!
On the other hand, you are kind of person that instead of helping mocks
others, then I suggest
you go to comedy clubs. This place is for professionals like me trying to
find solutions for not so evident
problems.
Sincerely,
Jaime
Jaime Perez wrote:
> Does anybody out there know how to create a search engine that would
> search
> specific sites for a specific keyword?
>
> Take a look at a program I saw on a magazagine called "Web Development".
>
> I did all the code but the program did not work.
>
> The code is at: http://jaime.laosb.org/cgi-bin/sitesearch.cgi
>
> The code is supposed to search stonehenge.com for the word the user
> inputs.
> The problem is that when the user inputs the stuff and submits the
> forms, it does not work.
>
> The system I am working with is a Linux with Perl 5.00503-2
>
> I have also installed modules:
>
> WWW-Search-2.05
> HTML-Parser-2.25
> URI-1.04
> libwww-perl-5.46
> libnet-1.0607
> MIME-Base64-2.11
> Digest-MD5-2.09
>
> The program code is at: http://jaime.laosb.org/sitesearch
>
> Please advise me on what I am doing wrong.
>
> -Jaime
------------------------------
Date: Sat, 20 Nov 1999 18:40:47 GMT
From: Eric Miller <dukat@flash.net>
Subject: sendmail pipe
Message-Id: <3836EA20.274B3E7F@flash.net>
Hi,
I'm using a pipe to sendmail on a UNIX box to send email. Occaisonally
sendmail will have an error, and I am trying to find an elegant way of
detecting the error.
I would like to be able to save the error message to a log file.
Currently I only have code that will send STDERR to STDOUT during
a script, but I am developing CGI applications and can't have
it interfering with the script output to STDOUT.
The FAQ is a bit confusing on this subject, and I don't know if
its possible to alter the following code to capture STDERR to
a string:
sub DoSendmail {
my ($sender, $recipient, $subject, $body) = @_;
open(MAIL, '|/usr/lib/sendmail -t') or die ("Can't sendmail - $!");
print MAIL "To: $recipient\n";
print MAIL "From: $sender\n";
print MAIL "Subject: $subject\n\n";
print MAIL $body;
close(MAIL);
}
------------------------------
Date: 20 Nov 1999 19:46:52 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: sendmail pipe
Message-Id: <816trc$8fb$1@gellyfish.btinternet.com>
On Sat, 20 Nov 1999 18:40:47 GMT Eric Miller wrote:
> Hi,
>
> I'm using a pipe to sendmail on a UNIX box to send email. Occaisonally
> sendmail will have an error, and I am trying to find an elegant way of
> detecting the error.
>
> I would like to be able to save the error message to a log file.
> Currently I only have code that will send STDERR to STDOUT during
> a script, but I am developing CGI applications and can't have
> it interfering with the script output to STDOUT.
>
> The FAQ is a bit confusing on this subject, and I don't know if
> its possible to alter the following code to capture STDERR to
> a string:
>
> sub DoSendmail {
> my ($sender, $recipient, $subject, $body) = @_;
> open(MAIL, '|/usr/lib/sendmail -t') or die ("Can't sendmail - $!");
> print MAIL "To: $recipient\n";
> print MAIL "From: $sender\n";
> print MAIL "Subject: $subject\n\n";
> print MAIL $body;
> close(MAIL);
> }
The exit code of the program opened in a pipe like that will be available
in the variable $? if the close() returns FALSE. You might want to read
the documentation for system() and perlipc for more on this.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Nov 1999 20:07:05 GMT
From: lee.lindley@bigfoot.com
Subject: Re: sendmail pipe
Message-Id: <816v19$8qu$1@rguxd.viasystems.com>
Eric Miller <dukat@flash.net> wrote:
:>Hi,
:>I'm using a pipe to sendmail on a UNIX box to send email. Occaisonally
:>sendmail will have an error, and I am trying to find an elegant way of
:>detecting the error.
:>I would like to be able to save the error message to a log file.
:>Currently I only have code that will send STDERR to STDOUT during
:>a script, but I am developing CGI applications and can't have
:>it interfering with the script output to STDOUT.
:>The FAQ is a bit confusing on this subject, and I don't know if
:>its possible to alter the following code to capture STDERR to
:>a string:
:>sub DoSendmail {
:> my ($sender, $recipient, $subject, $body) = @_;
:> open(MAIL, '|/usr/lib/sendmail -t') or die ("Can't sendmail - $!");
:> print MAIL "To: $recipient\n";
:> print MAIL "From: $sender\n";
:> print MAIL "Subject: $subject\n\n";
:> print MAIL $body;
:> close(MAIL);
:>}
You should check the return on that close(MAIL) just like
you check the return on the open().
The FAQ (perldoc -q stderr) says that to avoid confusion you should
just redirect stderr to a file and then read the file later. If
that answer is not adequate for you, then you might want to explore
perldoc IPC::Open3. But if you are struggling with the advice
in the FAQ on this subject, I would not recommend Open3; it will
expose you to issues with blocking that you are probably not
ready for yet.
--
// Lee.Lindley /// I used to think that being right was everything.
// @bigfoot.com /// Then I matured into the realization that getting
//////////////////// along was more important. Except on usenet.
------------------------------
Date: 20 Nov 1999 20:36:39 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: signature question (was Re: Help with Stoopid Nutscrape (Netscape))
Message-Id: <8170on$8kp$1@gellyfish.btinternet.com>
On Fri, 19 Nov 1999 16:08:08 -0800 David Cassell wrote:
> Abigail wrote:
>>
>> John McNamara (jmn.ac.delete@abanet.it) wrote on MMCCLXX September
>> MCMXCIII in <URL:news:=vYzOCo=h4C4KzBxKaXHLLf5olLP@4ax.com>:
>> ==
>> == The regex (and Abagail) are discussed in Chapter 10 of Andrew L.
>> == Johnson's Book. In Section 10.6.1 "Prime number regex".
> [snip]
>> Hmmm, I wonder if they send me a copy of the book then.
>> Probably not, times seem to have changed.
>
> Well, I got a free copy. Maybe it's yours. Just try getting
> it back.
>
How come you punks are getting free copies of books - how do I get in the
rubber chicken circuit here ?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Nov 1999 13:48:32 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: sort defaults to?
Message-Id: <slrn83duuj.m2v.abigail@alexandra.delanet.com>
Richard H (rhardicr@mail.ford.com) wrote on MMCCLXIX September MCMXCIII
in <URL:news:3832A02A.23FDA124@mail.ford.com>:
^^ Hi,
^^ I have a hash keyed by numbers and or text, I know i can do :
^^
^^ for (sort {$a <=> $b || uc($a) cmp uc($b) } keys %allrows) {
^^ print "$_ : @{ $allrows{$_} } \n";
^^ }
That will give a warning on -w.
^^ to sort, but if I just use :
^^
^^ for (sort {$a <=> $b} keys %allrows) {
^^ print "$_ : @{ $allrows{$_} } \n";
^^ }
^^
^^ the numbers are sorted but the text keys are not,
^^ will this sort impose any order to the entries keyed with text
^^ or does <=> evaluate them all to 1 ?
A string with no leading numbers in numerical context is 0.
^^ or do the text one not get sorted at all now?
Without making any assumptions on the numbers, except that they
are integers:
for (map {$_ -> [0]}
sort {$a -> [1] <=> $b -> [1] ||
$a -> [2] <=> $b -> [2] ||
$a -> [3] cmp $b -> [3]}
map {[$_ => /^-?\d+$/ ? (-1, $_, "") : (1, 0, $_)]} keys %allrows) {
...
}
This will sort all numbers before all strings. Change the regex to
taste if you have more complicated numbers.
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sat, 20 Nov 1999 10:17:13 -0800
From: "Dave Roth" <rothd@roth.REMOVE.net>
Subject: Re: SQL questions and Win32::ODBC
Message-Id: <NCBZ3.101890$y45.1753683@news4.giganews.com>
This error is triggered because you are requesting a method that does not
exist so the autoloader
tries to load a foo.al file. This simply means that you refered to a
function or method that does not
exist (maybe because of a misspelling or something).
BTW: the Sql() method is case sensitive with a capitol 'S'.
dave
--
===============================================================
Dave Roth ...glittering prizes and
Roth Consulting endless compromises, shatter
rothd@roth.remove.net the illusion of integrity
http://www.roth.net
Win32, Perl, C++, ODBC, Training
To send email remove the 'REMOVE.' from my reply address.
Our latest Perl book is now available:
"Win32 Perl Programming: The Standard Extensions"
http://www.roth.net/books/extensions/
"Jim Schuman" <netanator@home.com> wrote in message
news:87wZ3.214$HF2.2930@news.rdc1.ne.home.com...
> Hello,
>
> I am a programmer new to Perl. I downloaded the latest edition of
ActivePerl
> to my comp and attempted to use it. To the best of my knowledge the
> installation went fine. The simple programs I have written appear to work
as
> expected. However, I attepted to run a program that I found from a link
from
> the ActivePerl site. It was an example of how to implement the win32::odbc
> module which comes with ActivePerl. The normal output portion of the
program
> works fine, but it is not querying the database. It returns an error that
> says it cannot find a file called sql.al.
>
> Is this an installation error? Should there be a file by this name? Does
> anyone know where I can get a fix to this problem?
>
> Thanks,
> Jim
>
>
------------------------------
Date: Sat, 20 Nov 1999 21:31:26 GMT
From: "Jim Schuman" <netanator@home.com>
Subject: Re: SQL questions and Win32::ODBC
Message-Id: <OqEZ3.394$HF2.3702@news.rdc1.ne.home.com>
Thank you very much.
I did write the program quickly. Perhaps I did not find the error when I
looked it over.
I have had no problems with similiar programs on my comp at home (Win 98).
However, my work computer (NT Workstation) is where the problems occured.
I will give it a better lookover on Monday.
Thanks again!
Jim
------------------------------
Date: 20 Nov 1999 13:55:20 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Tracking Form Submissions?
Message-Id: <slrn83dvbi.m2v.abigail@alexandra.delanet.com>
Kevin J. Bennett (tdk@cris.com) wrote on MMCCLXIX September MCMXCIII in
<URL:news:38324244.CBAAE999@cris.com>:
&& Hello,
&&
&& I have a standard HTML form that collects data and submits to another
&& site other
&& than mine? Is there anyway through an HTML tag or CGI script to log the
&& submissions on my machine and pass the data on to the desired host at
&& the same time transparent to the user through the one submit button?
Yes. You would that in the same way as you would if you write your
application in Python.
And that disqualifies your questions as Perl questions!
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sat, 20 Nov 1999 20:23:30 GMT
From: honeypot@tienet.net (Honey)
Subject: Un deletable files HELP!!!
Message-Id: <38370504.4932886@news-server>
I have a cgi that wrote a file with non-standard characters. now I
can't delete the file the file name is lĄ I've tried an "unlink
routine with a wild card and it only deletes my cgi. anyone have any
ideas how to fix this.. I only have FTP access to the site.
Thanks
Honey
------------------------------
Date: 20 Nov 1999 17:43:55 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: What is a good book on Perl
Message-Id: <816mkr$80s$1@gellyfish.btinternet.com>
On 20 Nov 1999 11:15:43 -0500 Uri Guttman wrote:
>>>>>> "JS" == Jonathan Stowe <gellyfish@gellyfish.com> writes:
>
> JS> The boy Guttman has some fine book reviews on his web pages - this can be
> JS> found via <http://www.sysarch.com>.
>
> thanx for the plug. but "boy Guttman"? i am more insulted by that than
> by jakob the liar!
>
Well its a bit like 'the boy wonder' but you dont have to wear the dodgy
costume and the mask - now quiet or I'll set Terry Venables on you :)
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 20 Nov 1999 13:05:49 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: What is a good book on Perl
Message-Id: <slrn83dsem.m2v.abigail@alexandra.delanet.com>
Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCCLXXII September
MCMXCIII in <URL:news:8161op$78k$1@gellyfish.btinternet.com>:
|| On Fri, 19 Nov 1999 23:49:43 GMT crackbaby1@my-deja.com wrote:
|| > In article <814gi7$ptv$1@nntp2.atl.mindspring.net>,
|| > "Trulits" <trulits@hotmail.com> wrote:
|| >> I am interested in learning Perl.
|| >>
|| >> Is that what most cgi is written in these days?
|| >> I need to learn how to process forms
|| >> create and maintain databases
|| >> perhaps create, shopping carts, mailing lists apps, and guest book
|| > apps.
|| >>
|| >> What is a good book to learn?
|| >>
|| > Two books you must have...
|| >
|| > Programming Perl (Oreilly)
||
|| Absolutely - although maybe not the best book for a beginner to the whole
|| enterprise of programming.
Programming Perl was a fine book 3 years ago. Well, it's still a fine
book today, but Perl has moved on. PP describes Perl 5.003, while 5.005
is over a year old, and 5.6 is getting there. There are more worthwile
books to spend your $40 on.
I think the last time I used the Camel was to get an autograph from one
of its authors. And that was quite some time ago.
|| The boy Guttman has some fine book reviews on his web pages - this can be
|| found via <http://www.sysarch.com>.
Books I would recommend, probably to be read in the following order
if you want to learn programming and programming in Perl in particular:
- Cormen, Leiserson and Rivest: "Introduction to Algorithms".
- Chapman: "Perl, the Programmers Companion".
- Kernighan & Pike: "The Practice of Programming".
- Friedl: "Mastering Regular Expressions".
- Knuth: "The Art of Computer Programming, Vol I, II & III".
- Christiansen & Torkington: "The Perl Cookbook".
- Conway: "Object Oriented Perl".
- Stevens: "Advanced Programming in the UNIX Environment".
- Srinivasan: "Advanced Perl Programming".
- Walsh: "Learning Perl/Tk".
But first, you need to learn to program. I don't have a good
recommendation for a book there (as I've never seen a book to learn
programming with).
Some books aren't on the list because I don't like them, some books
aren't on the list because I don't know them.
Some well known books that I know and didn't put on my list:
- Schwartz & Christiansen: "Learning Perl".
- Orwant, Hietaniemi & MacDonald: "Mastering Algorithms with Perl".
- Hall with Schwarz: "Effective Perl Programming".
- Siever, Spainhour & Patwardhan: "Perl in a Nutshell".
- Wall, Schwartz, Christiansen: "Programming Perl".
Of course, when PP III comes out, it would most likely move to the list
of recommended books. How long it would stay there depends on how fast
Perl would move.
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 20 Nov 1999 14:18:37 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: What is a good book on Perl
Message-Id: <x73du1otte.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> But first, you need to learn to program. I don't have a good
A> recommendation for a book there (as I've never seen a book to learn
A> programming with).
the new johnson book from manning: elements of programming in perl (we
need a nickname or an abbrev for that) is aimed at first time
programmers. and as someone pointed out, you are mentioned in there as
the author of the cpu crippling prime number regex.
A> Of course, when PP III comes out, it would most likely move to the list
A> of recommended books. How long it would stay there depends on how fast
A> Perl would move.
larry (the wall one) just posted to p5p that he is editing that now. so
we have something to look forward too (maybe by next conference?)
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 20 Nov 1999 14:12:50 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: What is a good book on Perl
Message-Id: <slrn83e0cc.m2v.abigail@alexandra.delanet.com>
Abigail (abigail@delanet.com) wrote on MMCCLXXII September MCMXCIII in
<URL:news:slrn83dsem.m2v.abigail@alexandra.delanet.com>:
;; - Wall, Schwartz, Christiansen: "Programming Perl".
That's Wall, Christiansen & Schwartz.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 20 Nov 1999 14:14:21 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: What is a good book on Perl
Message-Id: <slrn83e0f6.m2v.abigail@alexandra.delanet.com>
Uri Guttman (uri@sysarch.com) wrote on MMCCLXXII September MCMXCIII in
<URL:news:x73du1otte.fsf@home.sysarch.com>:
{} >>>>> "A" == Abigail <abigail@delanet.com> writes:
{}
{} A> But first, you need to learn to program. I don't have a good
{} A> recommendation for a book there (as I've never seen a book to learn
{} A> programming with).
{}
{} the new johnson book from manning: elements of programming in perl (we
{} need a nickname or an abbrev for that) is aimed at first time
{} programmers. and as someone pointed out, you are mentioned in there as
{} the author of the cpu crippling prime number regex.
Yeah, I just got email from Johnson about this.
{} A> Of course, when PP III comes out, it would most likely move to the list
{} A> of recommended books. How long it would stay there depends on how fast
{} A> Perl would move.
{}
{} larry (the wall one) just posted to p5p that he is editing that now. so
{} we have something to look forward too (maybe by next conference?)
I know. Tom mentioned last year that he started working on it.
I wonder whether it'll be one or two books.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 20 Nov 1999 14:04:20 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Wierd List Behavior
Message-Id: <slrn83dvsd.m2v.abigail@alexandra.delanet.com>
Kragen Sitaker (kragen@dnaco.net) wrote on MMCCLXIX September MCMXCIII in
<URL:news:G_zY3.21486$YI2.964425@typ11.nn.bcandid.com>:
'' In article <3832C755.F5B47B9B@texas.net>, Tom Briles <sariq@texas.net> wrote:
'' >Kragen Sitaker wrote:
'' >> >I think Perl should report a parse error for two commas in a row.
'' >>
'' >> This may not have been clear: I think it would be a good idea for Perl
'' >> to treat this as a parse error.
'' >
'' >Warning, perhaps. Error, no.
''
'' Why not?
No error, no warning. Empty list elements are very convenient.
Or don't you never write:
%hash = (sleeping => "beauty",
ali => "baba",
seven => "dwarves",
snow => "white",
);
And if you allow empty elements at the end, why make an exception for
in between?
However,
@a = (,,,);
doesn't parse. And that is the real bug. ;-)
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sat, 20 Nov 1999 20:58:02 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Wierd List Behavior
Message-Id: <uXDZ3.31602$YI2.1516348@typ11.nn.bcandid.com>
In article <slrn83dvsd.m2v.abigail@alexandra.delanet.com>,
Abigail <abigail@delanet.com> wrote:
>No error, no warning. Empty list elements are very convenient.
>Or don't you never write:
>
> %hash = (sleeping => "beauty",
> ali => "baba",
> seven => "dwarves",
> snow => "white",
> );
Frequently, and I think *that* should be legal.
>And if you allow empty elements at the end, why make an exception for
>in between?
Because there's no valid reason to want to do it; if someone does do
it, it is invariably either a mistake or an attempt to obfuscate.
There *is* a reasonable interpretation of it -- treating the missing
elements as undef, which is what the original poster expected -- but
supporting that would be inconsistent with the empty-last-item handling.
Oh, well. I guess I shouldn't complain that Perl is Perl :)
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Sat, 20 Nov 1999 17:23:09 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Writing Modules
Message-Id: <816lcp$p4e$1@monet.op.net>
In article <383597dd.2803447@news.lineone.net>,
David Waters <davidwaters@bigfoot.com> wrote:
>Can anyone give me some tips please on how I go about writing a Perl
>module. Most of the standard documentation that I've come across is
>useless and doesn't explain the steps required to create a module.
Visit
http://www.plover.com/~mjd/perl/Hello/
That's the very very short tutorial about how to write modules. It
comes with a sampleprogram (nine lines of code) and eight exercises.
After you do the exercises, you know how to write a module. there's a
second part, which is about the same length, which is about writing an
object-oriented class.
A lot of people have told me that they liked it.
Hope this helps.
------------------------------
Date: Sat, 20 Nov 1999 15:46:57 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Y2K in perl
Message-Id: <x3yemdkzy9q.fsf@tigre.matrox.com>
gqc2017@my-deja.com writes:
> Hi, I am using localtime() in perl to get the current year. Now what
> can I do to make my code Y2K compliant?
Read some documentation. More specifically, read the docs on
localtime(), and checkout perlfaq4:
Does Perl have a year 2000 problem? Is Perl Y2K compliant?
--Ala
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 1447
**************************************