[17214] in Perl-Users-Digest
Perl-Users Digest, Issue: 4636 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 17 00:05:42 2000
Date: Mon, 16 Oct 2000 21:05:16 -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: <971755515-v9-i4636@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 16 Oct 2000 Volume: 9 Number: 4636
Today's topics:
Re: "Lite" Perl book required (Gwyn Judd)
Re: "Lite" Perl book required <uri@sysarch.com>
Re: "Lite" Perl book required <james@NOSPAM.demon.co.uk>
Re: "Lite" Perl book required (Gwyn Judd)
Re: "Lite" Perl book required (Randal L. Schwartz)
Re: [ Wildly OT ] Re: Japanese Girl Has PERL Request. <nospam@david-steuber.com>
Re: about sendmail (The Ghost In The Machine)
Re: Anyone try to use perl to handle GB text? <carfield@my-deja.com>
Can perl code be sandboxed? <nospam@david-steuber.com>
Re: Can perl code be sandboxed? <james@NOSPAM.demon.co.uk>
Re: Can perl code be sandboxed? (Gwyn Judd)
CGI script problem on Win <mab@sycon-design.com>
CGI.pm - questions on file creation <eweb.support@esolutions.co.nz>
Re: Convert Text to HTML <peter.sundstrom@eds.com>
Re: Create a copy of a variable (Gwyn Judd)
Re: Create a copy of a variable <ianb@ot.com.au>
Re: Disk Quotas <elephant@squirrelgroup.com>
Re: Executing PERL scripts from Linux <tony_curtis32@yahoo.com>
Re: Executing PERL scripts from Linux (Garry Williams)
Re: Executing PERL scripts from Linux (Gwyn Judd)
Re: Executing PERL scripts from Linux <president@webticker.com>
Help about simple patten matching <wstsoi@hongkong.com>
Help I cant dinf Net - NNTP at CPAN <wstsoi@hongkong.com>
Re: Help I cant dinf Net - NNTP at CPAN <tony_curtis32@yahoo.com>
Re: How to use .pl csript on IIS to send mail to NT Exc <james@NOSPAM.demon.co.uk>
Looking for older versions od PERL modules twod@my-deja.com
Re: newbie String problem <jeffp@crusoe.net>
Re: newbie String problem <galen.menzel@mail.utexas.edu>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 17 Oct 2000 01:44:23 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: "Lite" Perl book required
Message-Id: <slrn8unbni.ej1.tjla@thislove.dyndns.org>
I was shocked! How could Randal L. Schwartz <merlyn@stonehenge.com>
say such a terrible thing:
>However, for programmers already versed in language such as C or awk,
>you probably could skip all the parts of that redundancy, and spend
>your first 40 hours concentrating on just Perl. I think I know a book
>or two that does that, and rather effectively I'm told. :)
For the OP: Randal is modestly referring to his own (excellent)
"Programming Perl" which is just out in the third edition.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Dear Lord: Please make my words sweet and tender, for tomorrow I may
have to eat them.
------------------------------
Date: Tue, 17 Oct 2000 02:00:06 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: "Lite" Perl book required
Message-Id: <x7aec4teft.fsf@home.sysarch.com>
>>>>> "GJ" == Gwyn Judd <tjla@guvfybir.qlaqaf.bet> writes:
GJ> I was shocked! How could Randal L. Schwartz <merlyn@stonehenge.com>
GJ> say such a terrible thing:
>> However, for programmers already versed in language such as C or awk,
>> you probably could skip all the parts of that redundancy, and spend
>> your first 40 hours concentrating on just Perl. I think I know a book
>> or two that does that, and rather effectively I'm told. :)
GJ> For the OP: Randal is modestly referring to his own (excellent)
GJ> "Programming Perl" which is just out in the third edition.
well, he isn't officially an author of camel 3 (while he was for 1 and
2). the authors for the new edition are larry, tom and jon orwant (the
new cto of o'reilly). randal was referring to learning perl.
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: Tue, 17 Oct 2000 03:05:19 +0100
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: "Lite" Perl book required
Message-Id: <ant170219b07fNdQ@oakseed.demon.co.uk>
In article <slrn8unbni.ej1.tjla@thislove.dyndns.org>, Gwyn Judd
<URL:mailto:tjla@guvfybir.qlaqaf.bet> wrote:
> I was shocked! How could Randal L. Schwartz <merlyn@stonehenge.com>
> say such a terrible thing:
>
> >However, for programmers already versed in language such as C or awk,
> >you probably could skip all the parts of that redundancy, and spend
> >your first 40 hours concentrating on just Perl. I think I know a book
> >or two that does that, and rather effectively I'm told. :)
>
> For the OP: Randal is modestly referring to his own (excellent)
> "Programming Perl" which is just out in the third edition.
Err, you mean "Learning Perl" 2nd Ed. I think. See:
http://www.oreilly.com/catalog/lperl2/
I don't believe Randal was an author of "Programming Perl" 3rd Ed:
http://www.oreilly.com/catalog/pperl3/
Although he was an author of the 2nd Ed:
http://www.oreilly.com/catalog/pperl2/
--
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Tue, 17 Oct 2000 02:30:17 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: "Lite" Perl book required
Message-Id: <slrn8unedj.f7l.tjla@thislove.dyndns.org>
I was shocked! How could Uri Guttman <uri@sysarch.com>
say such a terrible thing:
>well, he isn't officially an author of camel 3 (while he was for 1 and
>2). the authors for the new edition are larry, tom and jon orwant (the
>new cto of o'reilly). randal was referring to learning perl.
My bad. Sorry Randal :)
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
Hacking's just another word for nothing left to kludge.
------------------------------
Date: 16 Oct 2000 19:51:51 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: "Lite" Perl book required
Message-Id: <m1lmvoyybc.fsf@halfdome.holdit.com>
>>>>> "James" == James Taylor <james@NOSPAM.demon.co.uk> writes:
James> I don't believe Randal was an author of "Programming Perl" 3rd Ed:
James> http://www.oreilly.com/catalog/pperl3/
I can acknowledge that it's accurate that you *believe* that. :-) And
that's it's accurate that I'm not *listed* as an author. But I'll
stop there.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Tue, 17 Oct 2000 01:47:01 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: [ Wildly OT ] Re: Japanese Girl Has PERL Request.
Message-Id: <m3g0lwfdd7.fsf@solo.david-steuber.com>
Russ Jones <russ_jones@rac.ray.com> writes:
' I've been told (since I was there and I don't remember it) that
' Woodstock was in the '60's and the phrase is "If you remember the
' '60's then you weren't there."
I don't remember the 60's either. But then, when I left, I was just a
few years old. So I have a good excuse.
Now for a word of warning. Do not take the brown acid. Or whatever
it was.
--
David Steuber | Perl apprentice, Apache/mod_perl user,
NRA Member | and general Internet web wannabe.
ICQ# 91465842
*** http://www.david-steuber.com/ ***
------------------------------
Date: Tue, 17 Oct 2000 02:42:05 GMT
From: ewill@lexi.athghost7038suus.net (The Ghost In The Machine)
Subject: Re: about sendmail
Message-Id: <slrn8unf52.2hb.ewill@lexi.athghost7038suus.net>
In comp.os.linux.misc, Andrew Serukov
<nospam@xepec.com>
wrote
on Fri, 13 Oct 2000 15:51:49 GMT
<pcGF5.6338$uw4.216630@newsread2.prod.itd.earthlink.net>:
>The ways of doing that are in RFC2557 "MIME Encapsulation of Aggregate
>Documents, such as HTML (MHTML)" :-
>
> http://www.rfc-editor.org/rfc/rfc2557.txt
>
>Again, I dont know of any MUAs / filters that could do that either.
Netscape seemed to like it fine, the one time I tried it. It's a
bit tricky because the image has to be encoded in base64, or
maybe quoted-printable (base64 would be more efficient), since
it's not text.
I think Outlook liked it, too.
I'll have to see if I can recreate it. It's not that difficult,
but one has to know the right "magic words", which are probably
described somewhere in the document above.
(No, I didn't use PERL; I coded this "by hand". Not that doing
the same in PERL would be difficult; others have suggested that
this problem has already been solved in MIME::Lite, as well.
I know nothing about this module, though.)
>
>--Andrew
>
>"Grant Edwards" <ge@nowhere.none> wrote in message
>news:frFF5.694$FU3.145149@ptah.visi.com...
>> In article <8s61gv$747$1@provolone.cs.utexas.edu>, Logan Shaw wrote:
>>
>> >Furthermore, as far as I know, there is no URL type that refers
>> >to othre attachments within a MIME message. If there were, one
>> >could send an e-mail with images attached that were referred to
>> >by an HTML file that was also attached, which would be very
>> >close to sending a web page by e-mail.
>>
>> I've seen exactly that done. I don't believe it's a standard
>> URL format, and I don't know how many MUAs impliment such a
>> scheme, but some do.
>>
>> --
>> Grant Edwards grante Yow! Why is everything
>> at made of Lycra Spandex?
>> visi.com
>>
>
>
--
ewill@aimnet.com -- insert random misquote here
------------------------------
Date: Tue, 17 Oct 2000 02:05:49 GMT
From: Carfield Yim <carfield@my-deja.com>
Subject: Re: Anyone try to use perl to handle GB text?
Message-Id: <8sgc5q$jjg$1@nnrp1.deja.com>
> > >As title, when I use chomp() to cut the end char of an article, it
act
> > >strange, anyone know why?
>
> No.
> Maybee you have an idea of what you think it should do, and the
reality
> does not conform to your idea?
>
> chomp does not cut any char at the end of a string.. It cut your
newline
> (if any), or whatever $/ is set to.
> Maybee you want to use chop instead?
>
> Best Regards
> Martin Quensel
>
>
Thx for reply, actually I should say more about this, yes, I want to
cut the newline of the Chinese text, but if I use the following script:
chomp($text);
I don't cut more than the newline symbol and destroy the text
If I use regex:
s/(.*)\n/$1/g
It work correctly, I just curious why this happen.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 17 Oct 2000 01:59:15 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Can perl code be sandboxed?
Message-Id: <m366msfcst.fsf@solo.david-steuber.com>
Is it possible to run a Perl script in an application that has an
embedded Perl interpreter, according to the perlembed documentation,
in such a way that the possibility of trojan horse code is not
executed? Or does anything go?
I ask because I am considering the possibility of using Perl as an
extensible data file format. Perhaps that is a really stupid idea and
someone will remind me of Melisa, the famous VBA bug in Microsoft Word
docs.
--
David Steuber | Perl apprentice, Apache/mod_perl user,
NRA Member | and general Internet web wannabe.
ICQ# 91465842
*** http://www.david-steuber.com/ ***
------------------------------
Date: Tue, 17 Oct 2000 03:27:31 +0100
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Can perl code be sandboxed?
Message-Id: <ant170231568fNdQ@oakseed.demon.co.uk>
In article <m366msfcst.fsf@solo.david-steuber.com>, David Steuber
<URL:mailto:nospam@david-steuber.com> wrote:
> Is it possible to run a Perl script in an application that has an
> embedded Perl interpreter, according to the perlembed documentation,
> in such a way that the possibility of trojan horse code is not
> executed? Or does anything go?
Is what you're trying to do covered by the standard Safe module?
Presumably you'll get plenty of people giving one line answers
to your question in the form "perldoc Safe" but as I don't have
perldoc on my system I won't do that. :-)
--
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Tue, 17 Oct 2000 02:33:48 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Can perl code be sandboxed?
Message-Id: <slrn8unek2.f7l.tjla@thislove.dyndns.org>
I was shocked! How could David Steuber <nospam@david-steuber.com>
say such a terrible thing:
>Is it possible to run a Perl script in an application that has an
>embedded Perl interpreter, according to the perlembed documentation,
>in such a way that the possibility of trojan horse code is not
>executed? Or does anything go?
Possibly you want to use "Safe". I have no experience with it though.
>I ask because I am considering the possibility of using Perl as an
>extensible data file format. Perhaps that is a really stupid idea and
>someone will remind me of Melisa, the famous VBA bug in Microsoft Word
>docs.
Amongst others...
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
PUBLISH
n. In literary affairs, to become the fundamental element in a cone
of critics.
------------------------------
Date: Mon, 16 Oct 2000 18:09:22 -0500
From: "Mike" <mab@sycon-design.com>
Subject: CGI script problem on Win
Message-Id: <sunalnhnmf2fc3@corp.supernews.com>
Hi !!
I am trying to run guestbook CGI script and File upload script on my Web
server on WIn 98.
There is no response to the action. I tried perl script.cgi and got the
following error message :
"offline mode: enter name=value pairs on standard input).
Anybody knows what does it mean ?
Thanks, Mike
------------------------------
Date: Tue, 17 Oct 2000 16:44:57 +1300
From: "Dave" <eweb.support@esolutions.co.nz>
Subject: CGI.pm - questions on file creation
Message-Id: <eXPG5.5807$yigc.47513978@news.xtra.co.nz>
Thanks for replies to the following, however does anyone have any code
snippets using the CGI.pm libs? Or what function would one use to create a
file?
----- Original Message -----
From: "Dave" <eweb.support@esolutions.co.nz>
Newsgroups: comp.lang.perl.misc
Sent: Monday, October 16, 2000 10:30 AM
Subject: File handling and user input
> Hi all,
> I am a total newbie to Perl and am attempting to write a script which will
> uses cgi-lib and will take XML formatted input (in a simple scrolling
form)
> and write it to a user specified file. I have made an effort with
> http://205.178.180.102/~businesk/sapdirectory/xmlupld.html - however we
are
> currently having permission problems. Basically I figured out I need to
use
> the &readparse routine to save the content as a file, however this seems
to
> be easier said than done! :)
>
> Once I get the permissions sorted, hopefully I'll be able to advance
further
> but any input would be most appreciated - if you require FTP access or SSH
> access please ask off list and I would be happy to give it to you.
>
> Regards,
> David K
>
>
That sounds as if you are using cgi-lib.pl. If so, throw it away and
run, don't walk, to CGI.pm.
--
Jeff
------------------------------
Date: Tue, 17 Oct 2000 14:21:10 +1300
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Convert Text to HTML
Message-Id: <8sg9p4$mi2$1@hermes.nz.eds.com>
Ian Boreham <ianb@ot.com.au> wrote in message
news:39EB8F53.AB1E91D8@ot.com.au...
> Peter Sundstrom wrote:>
>
> > > Well, for one thing, the plain text file might contain things like the
> > > "<" and ">" symbols, and these mean something in HTML. So, they'll
> > > need to be escaped.
> >
> > Not using the example above. cat will not interpret any special
characters.
>
> But the browser will. It is not a problem with cat. If the text file
contained
> something like:
>
> 1 < 2
>
> 5 > 4
>
> ...then the browser is going to try to turn < 2\n\n5 > into a tag. These
> characters and also ampersands need to be escaped.
I misunderstood the answer. Anyway, if the poster searches for txt2html on
any search engine, they will have plenty to choose from.
------------------------------
Date: Tue, 17 Oct 2000 01:36:45 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Create a copy of a variable
Message-Id: <slrn8unb99.ej1.tjla@thislove.dyndns.org>
I was shocked! How could Daniel Jones <ddjones@speakeasy.org>
say such a terrible thing:
>What's the best way to solve a problem? Post a question on
>it to the newsgroup. The answer will occur to you just as
>you hit the send button. <G> This seems to work:
>
>sub RemoveInstructor {
> my($Name, $Class) = @_;
>
> my $Instructors = $ClassRoster{$Class};
>
> for(my $i = 0; $i < @$Instructors; $i++) {
> if (${@$Instructors}[$i] eq $Name) {
> splice(@$Instructors, $i, 1);
> last;
> }
> }
>}
>
>This syntax:
>
>${@$Instructors}[$i]
>
>was a bit tricky, but I got it. Comments or criticisms on
>the code are still welcome, however.
Well if you ever find yourself searching though an array like this then
you really should be using a hash. ie. %ClassRoster should be a hash of
hashes rather than a hash of arrays. Once you do that, the removal
function becomes simple:
delete $ClassRoster{$Class}{$Name};
See 'perldoc perldsc'
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
A rock pile ceases to be a rock pile the moment a single man
contemplates it, bearing within him the image of a cathedral.
-- Antoine de Saint-Exupery
------------------------------
Date: Tue, 17 Oct 2000 13:17:53 +1100
From: Ian Boreham <ianb@ot.com.au>
Subject: Re: Create a copy of a variable
Message-Id: <39EBB6D1.195BEFE9@ot.com.au>
nobull@mail.com wrote:
> Answers about paragraph mode are valid in this particular case but
> don't address the OP's more general question.
But in fact the first post actually fixed the problem by inserting "my"
before names, making it lexically scoped. The explanation just didn't
mention it.
> > This doesn't work because @Names is always the same
> > variable;
>
> Quick solution. Change \@Names (i.e. "take a refereence to @Names")
> to [ @Names ] (i.e. "take a reference to an anonymous copy of
> @Names").
>
Using "my" is just as quick and is a better solution, since without it,
you are using a global variable, potentially affecting other parts of the
program.
>
> Better solution (avoids copying array), work with references the whole
> time:
In order to avoid copying, the "my" solution should look more like this
(based on Gwyn Judd's version):
#!/usr/bin/perl -w
use strict;
use Data::Dumper; # For my debugging
my %classes;
$/ = '';
open ROSTER, 'roster.txt' or die "Cannot open roster.txt: $!";
<ROSTER>;
while (<ROSTER>)
{
chomp;
my @names = split;
# Don't copy.
$classes{shift @names} = \@names;
}
print Dumper(%classes); # For my debugging
Regards,
Ian
------------------------------
Date: Tue, 17 Oct 2000 14:59:19 +1000
From: jason <elephant@squirrelgroup.com>
Subject: Re: Disk Quotas
Message-Id: <MPG.145687af11b6b124989821@localhost>
Rob Donovan wrote ..
>Anyone know a module/command for checking disk quotas.
>
>I'm trying to write a perl script to upload files to my web site and I need
>to check that I have enough disk space (/quota) left before I upload the
>file.
>
>The platform is Linux.
>
>I know about the 'quota' command but this just displays the info, I need it
>to be passed back to perl (say the total amount available or used).
not knowing anything about this 'quota' command or your situation - the
Perl operator qx allows you to run a system command and receive the
output of that command into a Perl variable
check it out in the perlop section of the documentation
perldoc perlop
--
jason -- elephant@squirrelgroup.com --
------------------------------
Date: 16 Oct 2000 20:05:06 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Executing PERL scripts from Linux
Message-Id: <87itqsb7lp.fsf@limey.hpcc.uh.edu>
>> On Tue, 17 Oct 2000 01:03:02 GMT,
>> Julian Cook/Sherab Gyatso <president@webticker.com> said:
> Hello again folks. I am running Red Hat Linux 6.1 and
> Perl 5.6 My perl is located at /usr/local/bin/perl
So why do you shebang /usr/local/bin/perl/ ?
Yes, it's almost certainly that easy.
Note you also want
#!/usr/local/bin/perl -w
use strict;
for maximum benefit.
hth
t
--
Eih bennek, eih blavek.
------------------------------
Date: Tue, 17 Oct 2000 01:45:46 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: Executing PERL scripts from Linux
Message-Id: <ebOG5.317$ds6.15595@eagle.america.net>
On Tue, 17 Oct 2000 01:03:02 GMT, Julian Cook/Sherab Gyatso
<president@webticker.com> wrote:
>I start every script with
>#!/usr/local/bin/perl/
You should probably be starting every script with:
#!/usr/local/bin/perl -w
use strict;
>I "chmod u+x testprogram.cgi"
>and when I try to run it straight from the command
>line by typing "testprogram.cgi", I get
>"bash: testprogram.cgi: command not found"
./testprogram.cgi
>When I do test with "perl testprogram.cgi"
>it works fine.
>
>I thought that as long as a script was executable
>and the first line contained the hash bang, then
>it would run.
It will, if the shell can find it in the PATH. It is generally
considered a mistake to include the current directory (.) in the PATH
variable. So, assuming that the script is not in a directory that
*is* in your PATH, you need to give the full path to the script for
the shell to find it.
>I am setting this script up as a cron job and I am
>referencing it by the script name.
Well, I'll save you some more grief: the environment that cron creates
for its jobs is *very* different than what you are probably used to on
your command line. You will need to supply either an explicitly set
PATH variable or the full path to the script for cron to be able to
find it.
--
Garry Williams
------------------------------
Date: Tue, 17 Oct 2000 02:36:34 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Executing PERL scripts from Linux
Message-Id: <slrn8unepa.f7l.tjla@thislove.dyndns.org>
I was shocked! How could Garry Williams <garry@ifr.zvolve.net>
say such a terrible thing:
>On Tue, 17 Oct 2000 01:03:02 GMT, Julian Cook/Sherab Gyatso
><president@webticker.com> wrote:
>>I start every script with
>>#!/usr/local/bin/perl/
>
>You should probably be starting every script with:
>
> #!/usr/local/bin/perl -w
> use strict;
Excellent advice, however I think the OP's problem was that his shebang
line refers to the directory '/usr/local/bin/perl/' rather than the
binary file '/usr/local/bin/perl'.
>>I "chmod u+x testprogram.cgi"
>>and when I try to run it straight from the command
>>line by typing "testprogram.cgi", I get
>>"bash: testprogram.cgi: command not found"
>
> ./testprogram.cgi
Which also will not succeed if the shebang line is wrong.
--
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
The person who can smile when something goes wrong has thought of
someone to blame it on.
------------------------------
Date: Tue, 17 Oct 2000 03:38:06 GMT
From: Julian Cook/Sherab Gyatso <president@webticker.com>
Subject: Re: Executing PERL scripts from Linux
Message-Id: <39EBC9BD.E1C3B836@webticker.com>
> Excellent advice, however I think the OP's problem was that his shebang
> line refers to the directory '/usr/local/bin/perl/' rather than the
> binary file '/usr/local/bin/perl'.
Thanks Gwyn,
but "/usr/local/bin/perl/" was a typo in my post.
They do start with "/usr/local/bin/perl" and they still
don't execute.
But you did a great job picking it out though.
> Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
> The person who can smile when something goes wrong has thought of
> someone to blame it on.
This was VERY funny...
Julian
------------------------------
Date: Tue, 17 Oct 2000 11:43:26 +0800
From: "Regent Linus" <wstsoi@hongkong.com>
Subject: Help about simple patten matching
Message-Id: <8sgi7u$n97$1@horn.hk.diyixian.com>
Hi I have a problem about extracting email address.
-------------------------------------------------------------------------
$_=q~
Regent Linus <regent@regent.com> (Regent's Lab.)
~;
s/.*?(\w+\@.*?(?:\..*)+)\W.*?/$1/os;
print;
-------------------------------------------------------------------------
It returns :
regent@regent.com> (Regent's Lab.)
why the non-word character \W can't match '>'?
Could anybody amend my code for me so that I could get
regent@regent.com?
Thanks
------------------------------
Date: Tue, 17 Oct 2000 10:20:27 +0800
From: "Lucas Gamp" <wstsoi@hongkong.com>
Subject: Help I cant dinf Net - NNTP at CPAN
Message-Id: <8sgdb9$l8m$1@horn.hk.diyixian.com>
why?
thanks.
------------------------------
Date: 16 Oct 2000 21:26:13 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Help I cant dinf Net - NNTP at CPAN
Message-Id: <87g0lwb3ui.fsf@limey.hpcc.uh.edu>
>> On Tue, 17 Oct 2000 10:20:27 +0800,
>> "Lucas Gamp" <wstsoi@hongkong.com> said:
> why? thanks.
Well, if "dinf" is meant to be "find" then
http://search.cpan.org/
=> "Net::NTTP"
hth
t
--
Eih bennek, eih blavek.
------------------------------
Date: Tue, 17 Oct 2000 03:50:24 +0100
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: How to use .pl csript on IIS to send mail to NT Exchange.
Message-Id: <ant1702240e8fNdQ@oakseed.demon.co.uk>
In article <87pul0ha5x.fsf@limey.hpcc.uh.edu>, Tony Curtis
<URL:mailto:tony_curtis32@yahoo.com> wrote:
> James Taylor said:
> > Do you know where to get Net::SMTP from? I looked
> > through CPAN several times and can't seem to find
> > anything with the name "Net::SMTP". Perhaps it is part
> > of another package?
>
> http://search.cpan.org/, enter "Net::SMTP" and there you are.
Oh! That was easy. I wonder why I couldn't find it in any of
the lists and categories at http://www.perl.com/CPAN/
I live and learn...
Thanks.
--
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Tue, 17 Oct 2000 02:38:27 GMT
From: twod@my-deja.com
Subject: Looking for older versions od PERL modules
Message-Id: <8sge33$l0q$1@nnrp1.deja.com>
I am in the processing of helping a company upgrade their installation
of PERL. The source code for PERL and installed modules is not under
source code control, so I have been asked to do this.
I have visited CPAN and have downloaded approx 50% of the older modules
that I need. The remainder are presumably either obsolete or look to
have been aged out of the archive as newer versions come along.
I have checked the CPAN search engine and FAQ, but have yet to find
anything.
Does anyone know of an online source for CPAN modules from mid-1998,
which is when this installation was created ?
Are there archives of CPAN out there ?
Some examples:
cpan version 1.225
DBI version 0.93
Data::Dumper version 2.081
Thanks
IAP
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 16 Oct 2000 21:18:41 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: newbie String problem
Message-Id: <Pine.GSO.4.21.0010162117100.25707-100000@crusoe.crusoe.net>
[posted & mailed]
On Oct 17, Hans-Helmut Kohls said:
>Hi, I need to get the 13th character of each line of a file, I am using
>the following command:
>
>while (<FIN>)
>{
> chomp;
> if (@_[13] eq ".") #I have tried $_[13] as well, but did not
>change a thing.
> {
> print FOUT $_;
> }
>}
The array @foo and the scalar $foo have nothing[1] in common. Use the
substr() function to access characters of a string:
if (substr($foo, 0, 1) eq 'x') { the first char is 'x' }
if (substr($foo, 1, 1) eq 'y') { the second char is 'y' }
if (substr($foo, 2, 1) eq 'z') { the third char is 'z' }
perldoc -f substr
[1] $foo and @foo are in the same typeglob, but you needn't worry about
that
--
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: Sun, 15 Oct 2000 21:36:10 -0500
From: Galen Menzel <galen.menzel@mail.utexas.edu>
Subject: Re: newbie String problem
Message-Id: <39EA699A.A0C0D1F8@mail.utexas.edu>
If you want to access individual characters in a string multiple times,
it's often easier to break the string up into an array of characters
like this:
@array = split //, $string;
$array[12] would then contain the thirteenth character of $string.
galen
Hans-Helmut Kohls wrote:
>
> Hi, I need to get the 13th character of each line of a file, I am using
> the following command:
>
> while (<FIN>)
> {
> chomp;
> if (@_[13] eq ".") #I have tried $_[13] as well, but did not
> change a thing.
> {
> print FOUT $_;
> }
> }
------------------------------
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 4636
**************************************