[16870] in Perl-Users-Digest
Perl-Users Digest, Issue: 4282 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 11 09:05:36 2000
Date: Mon, 11 Sep 2000 06:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <968677511-v9-i4282@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 11 Sep 2000 Volume: 9 Number: 4282
Today's topics:
Re: Adding the contents of multiple files. <munch@fastnet.co.uk>
Apche: How can I prevent denial of service? nl1753@my-deja.com
Creating the http-header without using CGI.pm <tom@tomklinger.com>
Re: Creating the http-header without using CGI.pm (Rafael Garcia-Suarez)
Does anyone have a nice solution to this problem? <j.kennedy@hamiltonrenata.co.uk>
Re: fgrep -i "greek_word" DOES NOT WORK <thestas@dolnet.gr>
Re: fgrep -i "greek_word" DOES NOT WORK (Martien Verbruggen)
Getting started w/ Perl <gphil111@my-deja.com>
Re: Getting started w/ Perl <lincolnmarr@nospam.europem01.nt.com>
Re: Getting started w/ Perl (Logan Shaw)
Re: Getting started w/Perl~fao Lincoln <unicon@btconnect.com>
Re: glob() feature = delightful japh (matt venn)
Re: glob() feature = delightful japh <jeffp@crusoe.net>
Re: glob() feature = delightful japh (matt venn)
Re: How long does flock take? (Martien Verbruggen)
LittleProblem <mcnultya@nortelnetworks.com>
Re: Msql-Mysql-modules-1.2215 install error <bill.kemp@wire2.com>
online auction scripts help <svavevav@idx.com.au>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 11 Sep 2000 09:56:00 GMT
From: Munch <munch@fastnet.co.uk>
Subject: Re: Adding the contents of multiple files.
Message-Id: <8pia7b$r83$1@nnrp1.deja.com>
Hi,
> It's unclear to me whether you want the sum of each field over all
IDs, or
> the sum of each field for each ID. In the first case I'd probably use
an
> array to store the sums; in the second I'd probably use a hash of
arrays,
> keyed on ID. In either case you'll need to somehow get a list of the
files
> and then loop over them, summing as you go.
>
> The second case seems more likely to me, so based on that, the inner
loop
> (reading from a particular file), might look something like this:
Sorry for the confusion, but you guessed right !
>
> while (<DATA>) {
> my ($id, $f1, $f2, $f3) = split /:/;
> $sums{$id}[0] += $f1;
> $sums{$id}[1] += $f2;
> $sums{$id}[2] += $f3;
> }
>
> %sums is a hash which should be declared (my %sums;) outside the loop
over
> the file names.
Excellent. Just the shove I needed.
>
> If the values of a particular field can be fractions
Thanks, but they are all whole numbers....
Regards,
James.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 11 Sep 2000 12:01:19 GMT
From: nl1753@my-deja.com
Subject: Apche: How can I prevent denial of service?
Message-Id: <8pihi6$2uu$1@nnrp1.deja.com>
Hi here!
How can i limit the number of connections or sockets that one IP-Adress
is allowed to open on Port 80?
I wrote a little Perl script that opens 1000 Sockets without closing
them, and it made Apache not working any more. That´s why I´am asking.
Thanks a lot for your help.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 11 Sep 2000 13:17:59 +0200
From: "Tom Klinger" <tom@tomklinger.com>
Subject: Creating the http-header without using CGI.pm
Message-Id: <Lb3v5.53$AP1.2952@nreader1.kpnqwest.net>
Hi!
I found out that most ISP's (or only mine?) have old CGI.pm modules
installed.
So I have to rewrite a script which lets you download files that are not
located in the normal webdirectory.
Therefore I've to generate the header on my own. Because of the missing
CGI.pm module I ask myself if this would work:
the header generated with CGI.pm:
$q->header(-type=>$mimetypes{$ext}, -attachment=>$filename, -Content_length=
>$filesize);
equal to:
...
print <<"END_OF_HEADER";
Attachment: $filename
Content-length: $filesize
Content-type: $mimetypes{$ext}
END_OF_HEADER
...
?
I already got a look in documentation papers I have but didn't find any
notice about the attachment item.
- tom
------------------------------
Date: Mon, 11 Sep 2000 11:35:38 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Creating the http-header without using CGI.pm
Message-Id: <slrn8rph81.e8r.rgarciasuarez@rafael.kazibao.net>
Tom Klinger wrote in comp.lang.perl.misc:
>Hi!
>
>I found out that most ISP's (or only mine?) have old CGI.pm modules
>installed.
>So I have to rewrite a script which lets you download files that are not
>located in the normal webdirectory.
>Therefore I've to generate the header on my own. Because of the missing
>CGI.pm module I ask myself if this would work:
>
>the header generated with CGI.pm:
>$q->header(-type=>$mimetypes{$ext}, -attachment=>$filename, -Content_length=
>>$filesize);
>
>equal to:
>...
>print <<"END_OF_HEADER";
>Attachment: $filename
>Content-length: $filesize
>Content-type: $mimetypes{$ext}
>
>END_OF_HEADER
>...
>
>?
Install perl on your machine, write a perl script that outputs the
headers you want, run it from the command-line, and look at what
appears.
--
Rafael Garcia-Suarez | http://rgarciasuarez.free.fr/
------------------------------
Date: Mon, 11 Sep 2000 12:07:40 +0100
From: "Joe Kennedy" <j.kennedy@hamiltonrenata.co.uk>
Subject: Does anyone have a nice solution to this problem?
Message-Id: <39bcbcf3@news.telinco.net>
I am currently writing a web-based database using perl and MS Access, and I
have the following problem.
Is there an easy way to re-print a results page (with many lines of summary
data), only re-ordered by a different field (or column)??
Currently when the user prints a summary results page, I have given them a
hyperlink on each column field name, so that they can re-print the page,
only re-sorted by a different column. However, some of the 'SELECT' calls
are very complex, and currently what I do is to call the same Perl scripts,
passing the 'SELECT' variables within the URL. I think this is a very clumsy
solution, and am sure there is an easier way. Any help would be greatly
appreciated!!
I also have a (related) query that's been bugging me for some time.....
Is it possible to call a perl script somewhere in the middle, rather than
starting at the beginning each time? If so, how do I do it?
Also, would this possibly help me resolve the above problem, where I could
simply by-pass the 'SELECT' part, and call the 'Print Summary Results' part?
All replies welcome!
Thanks,
Joe
------------------------------
Date: Mon, 11 Sep 2000 14:40:25 +0300
From: "Theodore Stassinos" <thestas@dolnet.gr>
Subject: Re: fgrep -i "greek_word" DOES NOT WORK
Message-Id: <8pigec$2b5j$1@ulysses.noc.ntua.gr>
This is a multi-part message in MIME format.
------=_NextPart_000_0026_01C01BFE.389E1060
Content-Type: text/plain;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
"Martien Verbruggen" <mgjv@tradingpost.com.au> wrote in message =
news:slrn8rjsut.dgd.mgjv@martien.heliotrope.home...
> [please, in the future, put your reply _after_ the suitably shortened
> text you reply to. It makes it much easier to read posts with multiple
> levels of quoting, since it obeys the natural flow of time. Besides
> that, that particular style of quoting is the one adopted by this =
group.
> Thank you]
> [reordered post]
>=20
> On Thu, 7 Sep 2000 21:51:52 +0300,
> Theodore Stassinos <thestas@dolnet.gr> wrote:
> > "Abigail" <abigail@foad.org> wrote in message
> > news:slrn8rfl7c.vlt.abigail@alexandra.foad.org...
>=20
> [snip of large amoutn of quoted, and misformatted text]
>=20
> > > Is there any relevance of your posting to this newsgroup?
> > >
> [snip]
> > But to make it clear to you, just for the reference of course is =
that , i
> > don't want to change the structure and filosophy of the entire =
program just
> > because a unix command doesn't work. I believe that perl, in which i =
have
> > written the program, has some methods to do the job.
>=20
> This makes no sense. If you don't want to change the structure of the
> program, then you will have to fix the external program. If you want =
to
> use internal methods, instead of the external program, you will need =
to
> restructure your program. You contradict yourself.
>=20
> > Maybe by converting the hexadecimal lowercase characters comming in =
Greek
> > (%e1-%f9) to their uppercase equivalents (%c1-d9) and the opposite =
would do
> > the job. Or even after the "pack" instruction which converts the =
hexadecimal
> > values to their character equivalent , i could produce for each =
greek word,
> > two other, one in uppercase and one in lowercase.
>=20
> Now, for the future, make sure that this is the sort of stuff you
> explicitly put in your first post. If you reread your original post, =
you
> will find that all it says is: 'this grep program doesn't do what I =
want
> it to do. How do I fix it?'.
>=20
> Not an ounce of Perl content.
>=20
> If you had phrased your question differently, people would have =
_known_
> what you were talking about, and what you planned to do.
>=20
> It is not _our_ responsibility to read your mind. It is not _our_
> responsibility to list all possible solutions to a problem that might
> potentially involve Perl, just because you're too vague. It is =
however,
> _your_ responsibility to ask a clear, and on-topic, question if you =
want
> an answer. If you don't, you waste time, other people's time. That
> pisses them off. Protesting their complaints only gets you a spot in
> killfiles.
>=20
> Learn from this, and be clear in the future. When someone criticises,
> first make sure that you're not at fault, before becoming defensive.
>=20
> In this case, you were at fault. Not deliberately, but still.
>=20
Hello Martien.
I think that indeed, i didn't express my self pretty good. This is =
obvious from everyone that read
my first message. I didn't do it on purpose. I was just harried and i =
didn't pay much attention to=20
my letter.=20
But the fact that someone didn't write the most appropriate message for =
this forum it doesn't give anyone the right=20
to become rude and to try to insult him.=20
I understand that you may receive a considerable number of trash =
everyday and
you may be pissed off and you want to discourage people, irrelevant to =
this language or forum, to write in here, but=20
i believe that you all people there must be careful not to be very =
aggressive.=20
Newsgroups are there to provide a way of useful communication and to be =
helpful for all.
I believe that the style some of the people use in here to answer, must =
be improved so the forum to become better.
And i am not criticising someone personally, you just have to check out =
some of the answers i received and you will
understand what i am saying.
Also i believe that the majority of people using the newsgroups, want to =
have a simple fast solution to a specific=20
problem. They don't want to undergo anyone who are trying to pass him =
self a "guru" or "perfect" even if he is right to
what he is saying. Personally i've helped in the past many fellows who =
had problems in many newsgroups. But i've never
insult anyone.
Just a quick answer or an instruction it would be extremely helpful.=20
> > So, as you see my friend my question has a big relevance to this =
perl
> > newsgroup and i am really sorry that you did not understood it.
>=20
> It really doesn't have that much relevance to the perl newsgroup. but =
at
> least it has some, _NOW_ you phrase it like that. The original =
question
> still has no relevance to Perl. No one could have been expected to =
read
> your original post in the way that you phrase it now. Abigail didn't
> misunderstand, you misstated, were simply not clear enough.
>=20
> Your fault. And again, your bitchy defensiveness only earned you spots
> in killfiles.
So if you people want to be helpful for us try to get right to the point =
and not to fill a whole page
with useless criticism, because the only thing you achieve is to make us =
wonder about the purpose of the forum and
generally of newsgroups.
Bye
>=20
> bye, bye
>=20
> Martien
> --=20
> Martien Verbruggen |=20
> Interactive Media Division | You can't have everything, where
> Commercial Dynamics Pty. Ltd. | would you put it?
> NSW, Australia |
------=_NextPart_000_0026_01C01BFE.389E1060
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-7">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>"Martien Verbruggen" <</FONT><A=20
href=3D"mailto:mgjv@tradingpost.com.au"><FONT face=3DArial=20
size=3D2>mgjv@tradingpost.com.au</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message </FONT><A =
href=3D"news:slrn8rjsut.dgd.mgjv@martien.heliotrope.home"><FONT=20
face=3DArial=20
size=3D2>news:slrn8rjsut.dgd.mgjv@martien.heliotrope.home</FONT></A><FONT=
=20
face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>> [please, in the future, put your =
reply _after_=20
the suitably shortened<BR>> text you reply to. It makes it much =
easier to=20
read posts with multiple<BR>> levels of quoting, since it obeys the =
natural=20
flow of time. Besides<BR>> that, that particular style of quoting is =
the one=20
adopted by this group.<BR>> Thank you]<BR>> [reordered =
post]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>> <BR>> On Thu, 7 Sep 2000 =
21:51:52=20
+0300,<BR>> Theodore Stassinos <</FONT><A=20
href=3D"mailto:thestas@dolnet.gr"><FONT face=3DArial=20
size=3D2>thestas@dolnet.gr</FONT></A><FONT face=3DArial size=3D2>> =
wrote:<BR>>=20
> "Abigail" <</FONT><A href=3D"mailto:abigail@foad.org"><FONT =
face=3DArial=20
size=3D2>abigail@foad.org</FONT></A><FONT face=3DArial size=3D2>> =
wrote in=20
message<BR>> > </FONT><A=20
href=3D"news:slrn8rfl7c.vlt.abigail@alexandra.foad.org"><FONT =
face=3DArial=20
size=3D2>news:slrn8rfl7c.vlt.abigail@alexandra.foad.org</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>> <BR>> [snip of large amoutn of quoted, and =
misformatted=20
text]<BR>> <BR>> > > Is there any relevance of your posting =
to this=20
newsgroup?<BR>> > ><BR>> [snip]<BR>> > But to make it =
clear to=20
you, just for the reference of course is that , i<BR>> > don't =
want to=20
change the structure and filosophy of the entire program just<BR>> =
>=20
because a unix command doesn't work. I believe that perl, in which i=20
have<BR>> > written the program, has some methods to do the =
job.<BR>>=20
<BR>> This makes no sense. If you don't want to change the structure =
of=20
the<BR>> program, then you will have to fix the external program. If =
you want=20
to<BR>> use internal methods, instead of the external program, you =
will need=20
to<BR>> restructure your program. You contradict yourself.<BR>> =
<BR>>=20
> Maybe by converting the hexadecimal lowercase characters comming in =
Greek<BR>> > (%e1-%f9) to their uppercase equivalents =
(%c1-d9) and=20
the opposite would do<BR>> > the job. Or even after the "pack" =
instruction=20
which converts the hexadecimal<BR>> > values to their character =
equivalent=20
, i could produce for each greek word,<BR>> > two other, one in =
uppercase=20
and one in lowercase.<BR>> <BR>> Now, for the future, make sure =
that this=20
is the sort of stuff you<BR>> explicitly put in your first post. If =
you=20
reread your original post, you<BR>> will find that all it says is: =
'this grep=20
program doesn't do what I want<BR>> it to do. How do I fix =
it?'.<BR>>=20
<BR>> Not an ounce of Perl content.<BR>> <BR>> If you had =
phrased your=20
question differently, people would have _known_<BR>> what you were =
talking=20
about, and what you planned to do.<BR>> <BR>> It is not _our_=20
responsibility to read your mind. It is not _our_<BR>> responsibility =
to list=20
all possible solutions to a problem that might<BR>> potentially =
involve Perl,=20
just because you're too vague. It is however,<BR>> _your_ =
responsibility to=20
ask a clear, and on-topic, question if you want<BR>> an answer. If =
you don't,=20
you waste time, other people's time. That<BR>> pisses them off. =
Protesting=20
their complaints only gets you a spot in<BR>> killfiles.<BR>> =
<BR>>=20
Learn from this, and be clear in the future. When someone =
criticises,<BR>>=20
first make sure that you're not at fault, before becoming =
defensive.<BR>>=20
<BR>> In this case, you were at fault. Not deliberately, but =
still.<BR>>=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>Hello =
Martien.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>I think that indeed, i =
didn't express=20
my self pretty good. This is obvious from everyone=20
that read</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>my first message. I didn't do =
it on=20
purpose. I was just harried and i didn't pay much attention to=20
</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>my letter. =
</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>But the fact that someone =
didn't write the=20
most appropriate message for this forum it doesn't give anyone the=20
right </STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>to become rude and to try to =
insult=20
him. </STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>I understand that you may =
receive a=20
considerable number of trash everyday and</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>you may be pissed off and you =
want to=20
discourage people, irrelevant to this language or forum, to write in =
here, but=20
</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>i believe that you all people =
there must be=20
careful not to be very aggressive. </STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>Newsgroups are there to provide =
a way of=20
useful communication and to be helpful for all.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>I believe that the style some =
of the people=20
use in here to answer, must be improved so the forum to become=20
better.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>And i am not =
criticising someone=20
personally, you just have to check out some of the answers i received =
and you=20
will</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>understand what i am=20
saying.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>Also i believe that the =
majority of=20
people using the newsgroups, want to have a simple fast solution to =
a=20
specific </STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>problem. They don't want to =
undergo anyone=20
who are trying to pass him self a "guru" or "perfect" even if he is =
right=20
to</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>what he is saying. Personally =
i've helped=20
in the past many fellows who had problems in many newsgroups. But i've=20
never</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>insult =
anyone.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>Just a quick answer or an =
instruction it=20
would be extremely helpful. </STRONG></FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2>> > So, as you see my friend =
my question=20
has a big relevance to this perl<BR>> > newsgroup and i am really =
sorry=20
that you did not understood it.<BR>> <BR>> It really doesn't =
have=20
that much relevance to the perl newsgroup. but at<BR>> least it has =
some,=20
_NOW_ you phrase it like that. The original question<BR>> still has =
no=20
relevance to Perl. No one could have been expected to read<BR>> your =
original=20
post in the way that you phrase it now. Abigail didn't<BR>> =
misunderstand,=20
you misstated, were simply not clear enough.<BR>> <BR>> Your =
fault. And=20
again, your bitchy defensiveness only earned you spots<BR>> in=20
killfiles.<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>So if you people want to =
be helpful=20
for us try to get right to the point and not to fill a whole=20
page</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>with useless criticism, because =
the only=20
thing you achieve is to make us wonder about the purpose of the =
forum=20
and</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>generally of=20
newsgroups.</STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3DArial size=3D2></FONT></STRONG> </DIV>
<DIV><STRONG><FONT face=3DArial size=3D2>Bye</FONT></STRONG></DIV>
<DIV><FONT face=3DArial size=3D2>> <BR>> bye, bye<BR>> <BR>> =
Martien<BR>> -- <BR>> Martien=20
Verbruggen &nb=
sp; =20
| <BR>> Interactive Media Division | =
You can't=20
have everything, where<BR>> Commercial Dynamics Pty. Ltd. =
| would=20
you put it?<BR>> NSW,=20
Australia &nbs=
p; =20
|</FONT></DIV></BODY></HTML>
------=_NextPart_000_0026_01C01BFE.389E1060--
------------------------------
Date: Mon, 11 Sep 2000 23:31:31 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: fgrep -i "greek_word" DOES NOT WORK
Message-Id: <slrn8rpk53.ntr.mgjv@martien.heliotrope.home>
On Mon, 11 Sep 2000 14:40:25 +0300,
Theodore Stassinos <thestas@dolnet.gr> wrote:
[large amounts of miswrapped, misquoted, multipart MIME-formatted,
half-encoded stuff]
And this, my friend, is really a bad idea. Usenet is a text only medium,
there is no place for all kinds of multipart MIME and HTML thingies. I
actually can't read them very well, with the result that I give up after
a few lines of trying to decipher stuff, even if the post was in direct
response to one of mine.
Note the followup-header (procmail filters out MIME crap better than
slrn score files)
Martien
--
Martien Verbruggen |
Interactive Media Division | Make it idiot proof and someone will
Commercial Dynamics Pty. Ltd. | make a better idiot.
NSW, Australia |
------------------------------
Date: Mon, 11 Sep 2000 08:53:17 GMT
From: Phil <gphil111@my-deja.com>
Subject: Getting started w/ Perl
Message-Id: <8pi6hp$ndf$1@nnrp1.deja.com>
Id really like to get into learning perl (specifically for cgi
purposes).
I dont have any programming knowledge, or knowledge of Unix. Just
another MS Win guy here (although I'd definately consider myself
advanced, as far as computer knowledge)
So, where to get started?
Since Perl is mainly for Unix environments, should I start with
learning a Unix OS first?
Or should I jump right into a Perl book? Already considering the many
recomendations that have been posted...
Im really serious about learning this. I absorb general computing info
rather quickly, so just how long (approx), spending several hours a
day, should getting it down take.... from now to pumping out working
cgi scripts for my sites?
Thanks much
Phil
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 11 Sep 2000 11:24:05 +0200
From: "Lincoln Marr" <lincolnmarr@nospam.europem01.nt.com>
Subject: Re: Getting started w/ Perl
Message-Id: <8pi8bc$fp7$1@qnsgh006.europe.nortel.com>
"Phil" <gphil111@my-deja.com> wrote in message
news:8pi6hp$ndf$1@nnrp1.deja.com...
> Id really like to get into learning perl (specifically for cgi
> purposes).
>
> I dont have any programming knowledge, or knowledge of Unix. Just
> another MS Win guy here (although I'd definately consider myself
> advanced, as far as computer knowledge)
>
Do you have a Unix box you can get started on? If not then you can run Perl
on your windows system, and just ftp your scripts to your site when you're
done. Nevertheless it will still be useful to learn basic Unix commands, as
you at some stage will probably need to telnet to your server and change
file permissions, move files etc.
> So, where to get started?
>
> Since Perl is mainly for Unix environments, should I start with
> learning a Unix OS first?
>
> Or should I jump right into a Perl book? Already considering the many
> recomendations that have been posted...
>
> Im really serious about learning this. I absorb general computing info
> rather quickly, so just how long (approx), spending several hours a
> day, should getting it down take.... from now to pumping out working
> cgi scripts for my sites?
>
> Thanks much
> Phil
>
I started learning Perl about 2 and a half months ago (I'm working full time
on it though) and in 2 days time my first complete Perl project will be up
and running - a web-interfaced flat file database system. Previous to perl I
knew only html and javascript, and I didn't have too much trouble picking up
the basic concepts behind how it works. But i would highly recommend
(perhaps even insist) that you get yourself a copy of O'Reilly's 'Learning
Perl' and 'Programming Perl' - these books really got me on my way.
Perl readily has plenty of resources available on the web, so how deep you
want to learn Perl depends on how much time you have. If you are working to
a schedule and have deadlines to meet (as I did) I simply took the cheats
way out by finding pre-made scripts online, taking out the guts and hacking
them about to suit me (by now the original script is totally unrecognizable
though).
However, if you want to become a proper programmer (like many people in this
newsgroup) this isn't really the best way to go about it. If you want your
programs to just do a simple job and you don't mind how compact your script
is or how much memory it takes to run it, then I would recommend using my
way of learning it. If, however, you want to develop your scripts to a
professional standard, make them memory efficient and easy for other people
to read and modify, then this will take you a lot longer. Perl's motto is
'there's more than one way to do it' - and this is always the case. Even if
you think you've figured out a pretty good way of doing something, someone
always comes up with about 10 alternatives you didn't even think of (at
least this is what happens with me!!).
So if you're serious about learning Perl, hang around this newsgroup and
read the posts - they're often very valuable for learning new things. After
a while you'll probably find that you enjoy programming in Perl. I have been
surprised at just how many resources are out there on Perl - there is a real
international Perl community who are (mostly) helpful enthusiasts.
To get a feel for Perl, just surf around www.perl.com and slowly it will all
come together. Hope this helps a bit....
--Lincoln
------------------------------
Date: 11 Sep 2000 05:25:30 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Getting started w/ Perl
Message-Id: <8pibuq$out$1@provolone.cs.utexas.edu>
In article <8pi6hp$ndf$1@nnrp1.deja.com>, Phil <gphil111@my-deja.com> wrote:
>Id really like to get into learning perl (specifically for cgi
>purposes).
>
>I dont have any programming knowledge, or knowledge of Unix. Just
>another MS Win guy here (although I'd definately consider myself
>advanced, as far as computer knowledge)
>
>So, where to get started?
If I were you, since (based on what you've said) you don't know any
programming languages, I'd including in my list some sort of book that
will teach you programming concepts (algorithms, etc.) as well as just
Perl. Although you can get by in CGI programming without knowing that
stuff, you'll find that you'll find good ways of thinking about things
that will help you solve problems. Plus, you may find that one day
you'll want to branch out into other kinds of programming besides CGI.
Based on what I've heard, "Elements of Programming with Perl" by Andrew
L. Johnson seems to be a book that combines learning Perl with learning
programming, and many of the reviews of it on Amazon are positive.
I will caution, though, that as much as I love Perl, it may not be the
best first language to learn. Computer science programs at
universities spend lots of times drilling into your head all the
programming mistakes you can make in the beginning that will cause you
heartache later and how to avoid them, and one of the tools they use
for this is teaching languages. Those languages aren't necessarily
useful in the real world, but they get you into good habits, and that
*is* useful. So, if you're learning with Perl, just realize that it
gives you lots of freedom, and probably only experts know enough to
exercise all that freedom.
Hope that helps.
- Logan
------------------------------
Date: Mon, 11 Sep 2000 13:33:06 +0100
From: jfp <unicon@btconnect.com>
Subject: Re: Getting started w/Perl~fao Lincoln
Message-Id: <39BCD102.2FFCBDC7@btconnect.com>
>
>
> I started learning Perl about 2 and a half months ago (I'm working full time
> on it though) and in 2 days time my first complete Perl project will be up
> and running - a web-interfaced flat file database system. Previous to perl I
> knew only html and javascript, and I didn't have too much trouble picking up
> the basic concepts behind how it works. But i would highly recommend
> (perhaps even insist) that you get yourself a copy of O'Reilly's 'Learning
> Perl' and 'Programming Perl' - these books really got me on my way.
Did it take you long to find a job that would let you use Perl as a beginner?
I'm from the same HTML JavaScript background as you and I'm currently learning
Perl, but finding a job to let me Perl (as a beginner) with my HTML/JavaScript
in the UK is proving hard!!
any tips anyone
john moylan
>
>
------------------------------
Date: Mon, 11 Sep 2000 08:47:44 GMT
From: matt@cipherdesign.com (matt venn)
Subject: Re: glob() feature = delightful japh
Message-Id: <39bc9bb2.3937021@news.ntlworld.com>
so i thought that the
q rr
was just obfuscation, but if you take it out, it no longer works.
why?
matt
------------------------------
Date: Mon, 11 Sep 2000 07:40:01 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: glob() feature = delightful japh
Message-Id: <Pine.GSO.4.21.0009110738280.12441-100000@crusoe.crusoe.net>
[posted & mailed]
On Sep 11, matt venn said:
>so i thought that the
>
>q rr
>
>was just obfuscation, but if you take it out, it no longer works.
>why?
Because the line is:
print q rr . reverse;
print() is a list operator. It does NOT impose scalar context on any of
its arguments. Thus just doing
print reverse;
would call reverse in LIST context, which returns the LIST of its
arguments in reverse order, so it would simply return $_ to print.
Adding the null string CONCATENATED to reverse causes the scalar context.
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Mon, 11 Sep 2000 12:12:41 GMT
From: matt@cipherdesign.com (matt venn)
Subject: Re: glob() feature = delightful japh
Message-Id: <39bccc31.16352373@news.ntlworld.com>
thanks!
------------------------------
Date: Mon, 11 Sep 2000 20:26:29 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: How long does flock take?
Message-Id: <slrn8rp9a5.m53.mgjv@martien.heliotrope.home>
On 11 Sep 2000 04:04:40 GMT,
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
> [A complimentary Cc of this posting was sent to Chris Fedde
> <cfedde@u.i.sl3d.com>],
> who wrote in article <juau5.21$W3.170898944@news.frii.net>:
> > >> why not use Time::HiRes to put a *real* timestamp in there .. it's
> > >> standard in 5.6 - not sure about earlier perls so you might need to get
> > >> it from CPAN .. goes down to microseconds
>
> > >... which most probably mean nothing. I would guess that on most
> > >systems the *granularity* of HiRes is of order of 10ms... There are
> > >some exceptions, of course...
>
> > I think that your guess is off by around 3 orders of magnatude.
> > At least on common pentium boxen.
>
> I do not see what the processor has to do with this - unless you use
> something like Linux, which (wrongly) use CPU cycle count for time
> measurements. But it looks like on Solaris Ultra5 the results are
> quite similar to what you reported:
\begin{offtopic}
And even on Solaris (7 and up IIRC) on Sparc hardware this, nowadays,
can be changed. Normal ticks are about 10 ms, but the system can be
told to work with finer ticks. The reason for that is that on hardware
with speeds that they have nowadays, some processes could use the times
in between ticks to run, without ever accumulating time that would show
up in sar reports.
\end{offtopic}
Martien
--
Martien Verbruggen |
Interactive Media Division | Hi, Dave here, what's the root
Commercial Dynamics Pty. Ltd. | password?
NSW, Australia |
------------------------------
Date: Mon, 11 Sep 2000 13:37:04 +0100
From: "nezarite" <mcnultya@nortelnetworks.com>
Subject: LittleProblem
Message-Id: <8pijjj$l2g$1@qnsgh006.europe.nortel.com>
Hey there,
I'm trying to do an algorithm to cycle through all possible combinations of
a number of letters in a string.
I'm not very good at making myself clear, but this should help:
I want to print the following:
aaaa
aaab
aaac
...
...
zzzz
Can anyone suggest an idea ?
The closest I have got is :
my $string = "aaaa";
my $length = length($string);
my @alphabet = (a..z);
for $len (1..$length) {
for $let (@alphabet) {
substr($string,$length-$len,1) = $let;
print $string;
print "\n";
}
}
But that doesn't really do what i want...
Cheers,
Nez.
------------------------------
Date: Mon, 11 Sep 2000 11:20:41 +0100
From: "W Kemp" <bill.kemp@wire2.com>
Subject: Re: Msql-Mysql-modules-1.2215 install error
Message-Id: <968667852.12865.0.nnrp-07.c3ad6973@news.demon.co.uk>
<big snip>
I have had problems with this too. Seems to be to do with different
compilers for the different components to get perl and mysql working
together.
You might have to recompile perl and mysql so you know its the same
compiler...
Is it redhat 6.2 ?
------------------------------
Date: Mon, 11 Sep 2000 22:00:32 +1000
From: "Simon Voorwinde" <svavevav@idx.com.au>
Subject: online auction scripts help
Message-Id: <39bcbca2@news1.idx.com.au>
I have downloaded the files needed to include an online auction to my site -
but as I know no perl I need someone to help me install it. I know a fair
amount of html and some javasctipt but no perl ( trying to find a library
with good books to try and learn what it's all about ). If there is an
Australian ( to get the time thing matched up ) out there who has icq and is
willing to be online to talk me through the installation instructions please
email me your icq number and I'll get back to you asap !
regards,
Simon
P.S. If you intend to flame me for this post - if it makes you feel better
go ahead.
------------------------------
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 4282
**************************************