[8538] in Perl-Users-Digest
Perl-Users Digest, Issue: 2155 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 22 00:08:29 1998
Date: Sat, 21 Mar 98 21:00:28 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sat, 21 Mar 1998 Volume: 8 Number: 2155
Today's topics:
Re: "Newbie" Crib Notes (Abigail)
A siomple question of asthetics. <russwyte@pcisys.net>
Re: Can't understand /g (match global) operator - help! <sneaker@earthling.net>
Re: Challenge your programming skill (Abigail)
Re: Challenge your programming skill (Abigail)
Re: chdir in win32 (xxx)
Re: for ($x,$y) ([0,0]..[5,5]) revisited (Abigail)
Re: how to know the version of the perl (Abigail)
Re: html parser - nevermind <rouslan@erols.com>
html parser <rouslan@erols.com>
inserted text <prudek@sol.cz>
Re: inserted text <sneaker@earthling.net>
Re: Is there a "Newsgroup" for Newbies to Perl? lvirden@cas.org
Re: Is there a "Newsgroup" for Newbies to Perl? <sneaker@earthling.net>
Re: Is there a "Newsgroup" for Newbies to Perl? (I R A Aggie)
Re: PerlRing??? (I R A Aggie)
perlshop customization help (Craig Neff)
Re: R.E. <stackhou@execpc.com>
Re: reset a array? <shockman@telefragged.com>
Segmentation Faults on some PMs <gwright@ravyn.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 22 Mar 1998 02:44:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: "Newbie" Crib Notes
Message-Id: <6f1ttl$dna$1@client3.news.psi.net>
Mark Stackhouse (stackhou@execpc.com) wrote on MDCLXIII September
MCMXCIII in <URL: news:6f11jq$57k@newsops.execpc.com>:
++ Please DO NOT post to this thread! The information here has
++ been assembled
++ as a resource for beginning Perlers. If you have comments,
++ flames, or an
++ excellent response to a beginners question, please reply to
++ "Sender Only".
++ I will do my best to add new information as I have time. If
++ you feel you must
++ post to the group, could you please start a new thread i.e.
++ Re: Was Newbies
++ Crib Notes? This thread should be allowed to expire. Thank
++ you.
Well, you didn't set a 'Followup-To:' header....
Besides, I think I have the right to followup to my own postings (see
the end of this posting) using whatever Subject I please.
++ >I have tried the perl documentation but was not able to find any source
++ >for my following problem:
++ >I would like to remove everything between '<' and '>' in a line and for
++ >all the instances. I am trying to work out a script that basically
++ >removes all the formatting tags in an HTML document. For the script:
++
++ How about:
++
++ $line =~ s/<[^>]*>//g;
++
++ Note: The above example *will* run into problems if '<' or
++ '>' actually
++ appear
++ in the desired text (in the text they should be represented
++ as < and >
++ or
++ if each '<' is not properly matched with its corresponding
++ '>'.
Well, < *CAN* appear in valid html and not be the beginning of tag.
Furtermore, > can appear inside a tag an *NOT* be the end.
If you really want to help newbies, please drag them to the FAQ where
this is explained, and which gives way better algorithms than the
above regex.
++ What you want is
++ $line =~ s/<.+?>//g;
++
++ Look for the term "greedy" in the perlre manpage.
No you don't. What you want is HTML::Parser.
++ try $line =~ s/<.*?>//g; - the *? is a
++ non-greedy pattern
++ match ie it matches the shortest as opposed to the longest
++ pattern
... and fail on a gazillion cases, including a newline inside a tag.
++ Count occurrences in a string:
++
++ $string = "-9 55 48 -2 23 -76 4 14 -44";
++ while ($string =~ /-\d+/g) { $count++ }
++ print "There are $count negative numbers in the string";
Or just $count = () = /-\d+/g;
++ while ($line = <IN>) {
That fails if the file ends with a lone 0
++ "Send mail" solution:
use Mail::Send;
Don't teach newbies to pipe into sendmail. Please.
++ my $var = 5;
++ print ("N plus one is ", $var + 1, "\n");
++
++ Try something like the following:
++
++ my $var = 5;
++ my $string "N plus one is ($var + 1)\n";
++ $string =~ s/\((.*?)\)/eval $1 or '[error]'/ge;
++ print $string;
++
++ which should yield
++
++ N plus one is 6
++
++ That substitution line grabs everything in parentheses, and
++ replaces
++ it with its evaluated form. The 'e' modifier tells the
++ substitution
++ operator to use the replacement text as raw perl code. If
++ the eval
++ fails, an error message is used instead.
Of course, it would sadly fail on (($var + 2) * 3).
print "N plus two times three is ${\(($var + 2) * 3)}\n";
++ Array element count:
++
++ ++ How can you get the length of an array that's an element
++ of another
++ ++ array?
++ ++
++ ++ For example, the naive approach doesn't work (prints
++ 581688):
++ ++
++ ++ #!/usr/local/bin/perl
++ ++
++ ++ @test = (["eggs","bacon","juice"],
++ ++ ["sandwiches","cheese"],
++ ++ ["tofu"],
++ ++ ["apple pie"]);
++ ++
++ ++ $length = @test[0]; # how many elements in the
++ first row?
++
++ Well, that's easy. All we need to do is get the array, and
++ evaluate
++ it in scalar context.
++
++ $test [0] is a ref to the first row.
++
++ Hence, @{$test [0]} is the first row.
++
++ Now we eval it in scalar context:
++
++ printf "%d\n", scalar @{$test [0]};
++
++
++ And that prints '3'.
WAIT A MINUTE!
*I* wrote that.
You can't just take someone's work, stuff it in a collection and pass
it off as "your gift to newbies".
That is illegal.
You didn't even bother to mention you stole it somewhere, let alone
from who.
I don't mind people quoting me, provided they use proper attributions
*and* don't stuff it in a collection of abominable quality.
I want you to take my work out of your collection, and never, ever
put anything by me in it again.
Abigail
--
perl -pwle '$_ .= reverse'
------------------------------
Date: Sat, 21 Mar 1998 21:27:53 -0700
From: "Russ White" <russwyte@pcisys.net>
Subject: A siomple question of asthetics.
Message-Id: <6f23ji$i8k$1@newman.pcisys.net>
I have an array of string scalars that will be printed to a file. They are
coming from an unformated file with no line breaks at all. I would like to
use a short piece of code to insert line breaks on whitespace between words
when a lines length gets to be about 60 character.
I have some ideas, but so far no luck.
I am sure I can use the s/// operator, but don't how to count the
characters.
Thanks for your time, and help.
------------------------------
Date: Sun, 22 Mar 1998 01:55:14 GMT
From: Sneex <sneaker@earthling.net>
Subject: Re: Can't understand /g (match global) operator - help!
Message-Id: <35146E26.DA3DE2EA@earthling.net>
How about this one, Randal?
$_ = "Just Another Perl Hacker";
while (/([$_])/g) {
print join(" ", map { defined $_ ? $_ : "undef" }
(' ' x length($`)), $&, (' ' x length($')), $+), "\n";
}
:-)
Sneex
Randal Schwartz wrote:
> First off, clip-n-save the following segment:
>
> $_ = "your string";
> while (/your regex/g) {
> print join(" : ", map { defined $_ ? $_ : "undef" }
> $`, $&, $', $1, $2, $3), "\n";
> }
------------------------------
Date: 22 Mar 1998 01:50:07 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Challenge your programming skill
Message-Id: <6f1qof$123$1@client2.news.psi.net>
Bart Lateur (bart.mediamind@tornado.be) wrote on MDCLXIII September
MCMXCIII in <URL: news:351b9588.4775289@news.tornado.be>:
++ Abigail wrote:
++
++ >However, the human race,
++ >specially in "modern" countries has the habit of all crawling together and
++ >live on each others lap. Clusters of humans are sometimes called cities.
++ >
++ >If your customers are clustered, your approach doesn't work well.
++
++ Customers in the same city do tend to have the same ZIP-code, don't
++ they?
No.
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: 22 Mar 1998 01:55:30 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Challenge your programming skill
Message-Id: <6f1r2i$123$2@client2.news.psi.net>
TomH (beans@bedford.net) wrote on MDCLXIII September MCMXCIII in
<URL: news:01bd5403$7b95eca0$119163ce@beans.bedford.net>:
++ I don't really want to start an algorithm war here (especially since, from
++ other of your postings I assume you are smarter than me), but this approach
++ is very efficient.
++
++ If the initial box returns too many customers, start cutting the box size
++ in half and eliminating customers from the set remaining; binary searches
++ are pretty hard to beat. I suppose one could optimize ahead of time by
++ assigning an initial box size to each zipcode, but I doubt it would be
++ worth it.
That results to an Omega (N log N) algorithm worst case. The basic problem
with your approach is that if the first selection returns "too many
customers" (that is, a linear number of customers) you might as well
have compared the distance of all customers with your query point.
Abigail
--
perl -we '$_ = "4a75737420616e6f74686572205065726c204861636b65720as";
for (s;s;s;s;s;s;s;s;s;s;s;s)
{s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}'
------------------------------
Date: Sun, 22 Mar 1998 03:26:52 +0100
From: "Salim Shadid" <salim@(xxx)shadid.com>
Subject: Re: chdir in win32
Message-Id: <6f1st0$917$1@belzebul.imaginet.fr>
dgriffith2@bender.com a icrit dans le message <3512B68B.721D@bender.com>...
>i'm using perl for win32 v5, the chdir function doesn't seem to work, no
>matter what syntax i use it will not change the dir out of
>c:\inetpub\wwwroot
>
>any ideas?
>
>...pls forgive my newbie-ism
>
> djg
Hello:
I'm not a Perl expert, but I experienced this problem before.
I think that the problem comes from DOS. In fact, if you are in the
directory c:\path and you want to change it to d:\path you couldn't do it
directly with DOS.
You have to do it with 2 commands:
d: #(change to drive)
cd \path #(change to path)
The best way to come over this is to install Perl, your http server and your
documentation directory in the same drive
Salim Shadid
_______________________________________________
Plus une idie est partagie par le plus grand nombre, plus il convient de
s'en mifier.
------------------------------
Date: 22 Mar 1998 02:57:25 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: for ($x,$y) ([0,0]..[5,5]) revisited
Message-Id: <6f1uml$dna$2@client3.news.psi.net>
Je ne care pas! (jefpin@bergen.org) wrote on MDCLXIII September MCMXCIII
in <URL: news:Pine.PCW.3.96.980321130447.13198A-100000@techmaster.bergen.org>:
++
++ I'm not sure if the P5P mailing-list is where I should have sent this, but
++ I am curious if anyone else has tried to make an Iterate module.
I have a function that allows you to do:
map2 {code} @list1, @list;
iterating over @list1 and @list2 in parallel.
sub map2 (&\@\@) {
my $package = caller || __PACKAGE__;
my $code = shift;
my @f = @{+shift}; # Copy.
my @s = @{+shift}; # Copy.
{ no strict 'refs';
map {${$package . '::a'} = shift @f; ${$package . '::b'} = shift @s;
$code -> ();} (1) x (@f < @s) ? @f : @s;
}
}
I don't know if that's much help for your case though.
The complete module is at
<URL:http://cthulhu.mandrake.net/%7Eabigail/Perl/List.pm>
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: 22 Mar 1998 02:01:59 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how to know the version of the perl
Message-Id: <6f1ren$123$3@client2.news.psi.net>
Gabor (gabor@vmunix.com) wrote on MDCLXIII September MCMXCIII in
<URL: news:slrn6h7a3u.m7p.gabor@vnode.vmunix.com>:
++ In comp.lang.perl.misc, Abigail <abigail@fnx.com> wrote :
++ # lihong@public1.guangzhou.gd.cn (lihong@public1.guangzhou.gd.cn) wrote on
++ # MDCLXIII September MCMXCIII in <URL: news:6ev1ju$n49$1@nnrp1.dejanews.com>:
++ # ++ How can I know the version of perl running on my workstation?
++ # ++ the first line of perl scirpt should be /usr/local/bin/perl.
++ #
++ # perl -weprint$]
++ #
++ # Or you RTFM for a more friedlier approach.
++
++ Or one that works. :)
++ That will give the message
++ 'Illegal varibale name'
++
++ You forgot to backslash the $, to keep it from being interpreted by
++ the shell.
You need a better shell. My shell doesn't complain.
$ $SHELL --version
GNU bash, version 2.01.0(1)-release (sparc-sun-solaris2.5.1)
Copyright 1996 Free Software Foundation, Inc.
$
And for that matter, it works in the Bourne shell as well, as well
as in ksh.
It fails in (t)csh. But then, who wants to use csh and derivates
anyway? ;)
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: Sat, 21 Mar 1998 22:39:07 -0500
From: Rouslan Zenetl <rouslan@erols.com>
Subject: Re: html parser - nevermind
Message-Id: <351487DB.E33B9D5@erols.com>
--------------C14625CE49939BF2B505FA3E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
i just read "Newbie" Crib Notes Abigail's reply (about 10 min after my
posting) to somebody's similar question and off looking for
HTML::Parser.
it doesn't mean that i will not come back with questions about it ;-)
Rouslan Zenetl wrote:
> is there a perl-based html parser? or should i rather start looking
> towards python?
>
> thanks in advance for any pointers.
>
> regarsd,
> zr
--------------C14625CE49939BF2B505FA3E
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
i just read <A HREF="news://news.erols.com/6f1ttl%24dna%241@client3.news.psi.net">"Newbie"
Crib Notes</A> Abigail's reply (about 10 min after my posting) to somebody's
similar question and off looking for <TT>HTML::Parser</TT>.
<P>it doesn't mean that i will not come back with questions about it ;-)
<P>Rouslan Zenetl wrote:
<BLOCKQUOTE TYPE=CITE>is there a perl-based html parser? or should i rather
start looking
<BR>towards python?
<P>thanks in advance for any pointers.
<P>regarsd,
<BR>zr</BLOCKQUOTE>
</HTML>
--------------C14625CE49939BF2B505FA3E--
------------------------------
Date: Sat, 21 Mar 1998 22:25:29 -0500
From: Rouslan Zenetl <rouslan@erols.com>
Subject: html parser
Message-Id: <351484A9.5B266CA3@erols.com>
is there a perl-based html parser? or should i rather start looking
towards python?
thanks in advance for any pointers.
regarsd,
zr
------------------------------
Date: Sun, 22 Mar 1998 03:34:30 +0100
From: Milos Prudek <prudek@sol.cz>
Subject: inserted text
Message-Id: <351478B6.B681ED1F@sol.cz>
The following is taken from a simple phonebook script. I do not
understand the print <<"HTML"; command. I looked into Larry Walls
"Programming in Perl" but it does not seem to be there. What am I
missing?
print <<"HTML";
<H1>Information added</H1>
The information entered has been added to the phonebook.
<HR>
<CENTER>
<A HREF="/pbook.html">[Return to the Phonebook]</A>
</CENTER>
HTML
Is this the standard way to put large inserted files into perl code?
How would it look if the print command should write to file instead of
stdout?
--
Milos Prudek
prudek@sol.cz
PGP: http://www.bva.czn.cz/pgp/prudek.asc
ICQ: 2141501
------------------------------
Date: Sun, 22 Mar 1998 04:07:19 GMT
From: Sneex <sneaker@earthling.net>
Subject: Re: inserted text
Message-Id: <35148D1A.3D6065A@earthling.net>
Try the following -
Milos Prudek wrote:
> The following is taken from a simple phonebook script. I do not
> understand the print <<"HTML"; command. I looked into Larry Walls
> "Programming in Perl" but it does not seem to be there. What am I
> missing?
>
> print <<"HTML";
> <H1>Information added</H1>
> The information entered has been added to the phonebook.
> <HR>
> <CENTER>
> <A HREF="/pbook.html">[Return to the Phonebook]</A>
> </CENTER>
> HTML
print <<__HTML__;
Content-type: text/html
<HTML><HEAD><TITLE>Perl Rocks!</TITLE></HEAD><BODY BGCOLOR=WHITE>
<H1>Information added</H1>
The information entered has been added to the phonebook.
<HR>
<CENTER>
<A HREF="/pbook.html">[Return to the Phonebook]</A>
</CENTER>
</BODY>
</HTML>
__HTML__
HTH,
Sneex :-)
------------------------------
Date: 22 Mar 1998 00:53:31 GMT
From: lvirden@cas.org
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6f1neb$710$1@srv38s4u.cas.org>
According to Mark P Stackhouse <stackhou@elk.cray.com>:
:David Oswald wrote:
:>
:> But don't you understand? This isn't a helpdesk.
:
:My point exactly! We need a "helpdesk"!
:
:> I've been putting in the effort; got a minor in Comp. Sci., read cover
:> to cover (and re-read) the Camel, Llama, Owls, and Mouse books, spent
:> a lot of time at www.perl.com, worn holes in the soles of DejaNews,
:
:Do you really expect a "Newbie" to buy and read 4 books at the same
:time? I have, and am reading "Learning Perl", but I still get confused
:sometimes. Sorry, but my mind isn't a steel trap! I DO, use the
:resources available on-line but they're not very friendly... to a
:"Newbie", the answer can be more confusing than the question. All we
:get from the docs is the syntax...very few examples to learn from.
Actually, you are putting forth a lot more effort that should be necessary
for some kinds of help.
It seems to me that there is currently a growing need for Perl support for
folk in 'appliance mode'. That is to say, folk who have no interest in
being programmers or looking _inside_ the code. They want to use
Perl like they would a toaster, radio, or vehicle - to get some function
done. Do others think that this user is one that the community should
expect? To me, the folk building WWW sites and their need for
CGI 'appliances' seem to be the first move into this arena.
Perhaps perl (or any other programming language) isn't really ready for
this yet. I would have to say that Visual Basic seems, from the coments
I get from friends, to be pretty close - in that with their interactive
environment and shrink wrapped components that one can buy off the shelf
and 'drag and drop' into applications, folk can get things done without
knowing much of anything about the internals of the actions.
Certainly Perl's module concept is good first steps towards this type of
user. But if someone has to get compilers, books, pages of FAQs,
man pages, internet connections and web browsers (to search online
archives and web pages) and seemingly then to learn to program in one
language and THEN to learn perl, before being able in many cases to ask
for help would seem to be a pretty steep intro curve for the appliance
user.
Is there a _well written_ perl book, for someone who knows nothing about
programming, but wants to learn? Is there a _well written_ perl book
for the appliance user?
--
<URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
<*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Sun, 22 Mar 1998 02:11:19 GMT
From: Sneex <sneaker@earthling.net>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <351471EC.86855D08@earthling.net>
lvirden@cas.org wrote:
> It seems to me that there is currently a growing need for Perl support for
> folk in 'appliance mode'.
> Perhaps perl (or any other programming language) isn't really ready for
> this yet. I would have to say that Visual Basic seems, from the coments
> I get from friends, to be pretty close - in that with their interactive
> environment and shrink wrapped components that one can buy off the shelf
> and 'drag and drop' into applications, folk can get things done without
> knowing much of anything about the internals of the actions.
>
> Certainly Perl's module concept is good first steps towards this type of
> user. But if someone has to get compilers, books, pages of FAQs,
> man pages, internet connections and web browsers (to search online
> archives and web pages) and seemingly then to learn to program in one
> language and THEN to learn perl, before being able in many cases to ask
> for help would seem to be a pretty steep intro curve for the appliance
> user.
>
> Is there a _well written_ perl book, for someone who knows nothing about
> programming, but wants to learn? Is there a _well written_ perl book
> for the appliance user?
> --
> <URL:mailto:lvirden@cas.org> Quote: In heaven, there is no panic,
> <*> O- <URL:http://www.teraform.com/%7Elvirden/> only planning.
> Unless explicitly stated to the contrary, nothing in this posting
> should be construed as representing my employer's opinions.
I agree with you, but I must say that Perl will
become 'self perpetuating' soon - and then, watch out! :-)
Sneex :-)
PS - I also think that the end-user's level of expectations must become level
with the 'flexibility' of Perl. I get pissed off when people say they are
programmers when they say 'I can click click clickty click and get my apps to
do anything. That is what Unix should do to make it friendlier...' Those same
users keep coming back to me asking if this or that is possible, asking for
T/S help, and still haven't produced a production system in several months;
all the while begging management for more time...
------------------------------
Date: Sat, 21 Mar 1998 21:44:15 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <fl_aggie-2103982144150001@aggie.coaps.fsu.edu>
In article <6f1neb$710$1@srv38s4u.cas.org>, lvirden@cas.org wrote:
+ Certainly Perl's module concept is good first steps towards this type of
+ user. But if someone has to get compilers, books, pages of FAQs,
+ man pages, internet connections and web browsers (to search online
+ archives and web pages) and seemingly then to learn to program in one
+ language and THEN to learn perl, before being able in many cases to ask
+ for help would seem to be a pretty steep intro curve for the appliance
+ user.
Do appliance users in the Real World go to Radio Shack, buy components,
and put together a 4 head VHS tape recorder?
No. Why should they expect to be able to walk in, slap together a
couple of subroutines and a main program, and a functioning CGI script?
These are the same people who complain that setting the said VCR's
clock is hard. Do you want them modifying CGI scripts and putting
them on YOUR server?
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Sat, 21 Mar 1998 21:46:43 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: PerlRing???
Message-Id: <fl_aggie-2103982146430001@aggie.coaps.fsu.edu>
In article <1d69hyw.a1yeooyjyakgN@host043-206.seicom.net>,
joergen.lang@schwaben.de (Joergen W. Lang) wrote:
+ Since Perl is cross-platform, maybe it would be a good idea to have a
+ cross-platform version of the docs instead of (or complementing) the
+ pod-files ?
pod2html. It should be included in the distribution. Someone has
even gone as far as converting the docs into searchable PDF documents.
Thank that person. That should be platform independent enough.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Sun, 22 Mar 1998 03:00:24 GMT
From: craig@web-designs.net (Craig Neff)
Subject: perlshop customization help
Message-Id: <35147e90.249964288@news.mindspring.com>
Greetings!
Looking for help getting arapnet's perlshop script to run on a
mindspring web hosting server in exchange for some almighty US
dollars.
If you are familiar with mindspring web hosting accounts, and know
perl5 please email: craig@web-designs.net
I can explain the problem in email, and you can give me an estimate on
how much it will cost me to get this running.
SERIOUS INQUIRIES ONLY PLEASE emailed to the address above.
Thanks in advance,
--
Craig Neff
------------------------------
Date: Sat, 21 Mar 1998 14:48:37 -0600
From: Mark Stackhouse <stackhou@execpc.com>
Subject: Re: R.E.
Message-Id: <6f19b4$dob@newsops.execpc.com>
@arr=("hello here",hi,there);
Chico wrote:
>
> hello...
>
> can anyone help me with one regular expression?
>
> for example,
> i have one string> ' "hello here" hi there '
> and i want to put it in an array like this:
> arr[0] = hello here
> arr[1] = hi
> arr[2] = there
>
> i tried something even in more than one line... but i'm not really
> good at this...
>
> and i'd like also, if possible, an URL with something about regular
> expressions!
>
> thank you
------------------------------
Date: Sun, 22 Mar 1998 03:12:05 +0100
From: "Magnus \"ShockMan\" Blikstad" <shockman@telefragged.com>
Subject: Re: reset a array?
Message-Id: <35147375.BD5437D0@telefragged.com>
Actually undef @array does exactly what i want to... sorry for not being clear
enough what i wanted to do, im just abit tired. Haven't sleeped to much the last
couple of days (thats what happens when you got a deadline =). Well... i dont
really have a deadline, just that i want this thing to be done as quick as
possible. Anway; thanx for all the help.
-Magnus "ShockMan" Blikstad
Uri Guttman wrote:
> Sneex <chasecreek.systemhouse@usa.net> writes:
>
> > Try either -
> > undef @array;
> > @array = '"";
>
> sorry, sneex, the last one is wrong. it will set the array to a list of
> one element which is a null string. and your quotes are mismatched too.
>
> you wanted:
>
> @array = () ;
>
> while undef @array actually removes it from the symbol table which is
> more than just resetting it.
>
> uri
>
> --
> Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
> Perl Hacker for Hire ---- 8 Years of Perl Experience, Available Immediately
> uri@sysarch.com --------- Resume and Perl Example at http://www.sysarch.com
> Use the Best Search Engine on the Net -------- http://www.northernlight.com
------------------------------
Date: 22 Mar 1998 04:44:56 GMT
From: "Gregory Wright" <gwright@ravyn.com>
Subject: Segmentation Faults on some PMs
Message-Id: <01bd554e$55ae2c90$0c00a8c0@orthanc>
I have been plagued the last few days with segmentation
faults when 'use'ing certain Perl modules. This is new
system, with freshly a freshly compiled version of perl
5.4_004. But if I try to 'use' certain facilities, such as
Test::Harness, DBI or even FileHandle, I get behaviour
like the following:
<EXAMPLE>
web1:~# perl -d
Loading DB routines from perl5db.pl version 1.01
Emacs support available.
Enter h or `h h' for help.
use FileHandle;
Segmentation fault
</EXAMPLE>
This is repeatable at will, but does not happen with
*all* modules. I can 'use' such things as strict and
Exporter, for example, which are 'use'd by some of
the modules in question.
Any help would be appreciated, as I am under the
gun, and I'm not sure how to fix this. Info on the
version of perl, and it's environment follows:
<VERSION>
web1:~$ perl -v
This is perl, version 5.004_04 built for i686-linux
Copyright 1987-1997, Larry Wall
Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5.0 source kit.
web1:~$ perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
Platform:
osname=linux, osvers=2.0.33, archname=i686-linux
uname='linux web1 2.0.33 #4 sat feb 28 20:10:21 est 1998 i686 '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=y useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.7.2.3
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /shlib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, so=so
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under linux
Compiled at Mar 1 1998 16:12:52
@INC:
/usr/lib/perl5/i686-linux/5.00404
/usr/lib/perl5
/usr/lib/perl5/site_perl/i686-linux
/usr/lib/perl5/site_perl
</VERSION>
--
Gregory Wright (gwright@ravyn.com)
Ravyn Multimedia
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 2155
**************************************