[7567] in Perl-Users-Digest
Perl-Users Digest, Issue: 1193 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Oct 18 11:07:36 1997
Date: Sat, 18 Oct 97 08:00:22 -0700
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, 18 Oct 1997 Volume: 8 Number: 1193
Today's topics:
Re: $self in destructor? (Toutatis)
Re: Big Newbie Question?? Please Help!!! (brian d foy)
Re: Bulk email solution needed that works with Linux, P (Olaf Titz)
Re: Can someone look at this and tell me why it doesn't (Toutatis)
Error Trapping with "die" and eval (Mike S)
Re: Error Trapping with "die" and eval (brian d foy)
Re: file compression and decompression <nospam@domain.com>
Re: file compression and decompression <nospam@domain.com>
Re: How to make a word bold? <nospam@domain.com>
ITS AWESOME (W. K. Stone)
Re: Lookbehind (brian d foy)
Re: Lookbehind (Tad McClellan)
Most efficient way to parse large text files (Thomas Munn)
Mutiprocessor seg fault (Christopher Small)
Re: Mutiprocessor seg fault (Jason Gloudon)
Re: qqq (Ilya Zakharevich)
Reading from an already-open file <jgoerzen+usenet@complete.org>
Re: Searching Perl(5) grammar (Nem W Schlecht)
Re: Searching Perl(5) grammar <merlyn@stonehenge.com>
Re: What kind of string will work ? (brian d foy)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 18 Oct 1997 08:07:04 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: $self in destructor?
Message-Id: <toutatis-ya023180001810971007080001@news.euro.net>
Todd O'Boyle <oboyle@cs.purdue.edu> wrote:
> I need to use $self from the current package in the destructor
> of my object. Is there some way to attain it? I don't see
> an obvious way to pass it to END(), so..
#in you package:
sub DESTROY {
my $self = shift;
#Do your stuff
}
DESTROY is automatically called before your object is cleaned up.
--
Toutatis
------------------------------
Date: Sat, 18 Oct 1997 01:24:24 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Big Newbie Question?? Please Help!!!
Message-Id: <comdog-ya02408000R1810970124240001@news.panix.com>
In article <344832c0$1$senaxyva$mr2ice@news.alltel.net>, franklin@ideas4you.com wrote:
>How do you start a new file.
look into using open().
perldoc -f open
it's a good idea to read through the perlfunc manpage from start to finish
at least once so you have an idea which functions are available. :)
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 18 Oct 1997 11:51:31 +0200
From: olaf@bigred.inka.de (Olaf Titz)
Subject: Re: Bulk email solution needed that works with Linux, Perl
Message-Id: <62a0r3$iov$1@bigred.inka.de>
Brad Knowles <brad@his.com> wrote:
> You will notice that the largest "private subscription email" service
> in the world (InfoBeat, was Mercury Mail) is *not* using QMail. They're
> using sendmail, properly configured. I'd say that's a pretty big vote
> against qmail in that kind of environment.
It is only a vote against qmail if they have evaluated both and then
chosen sendmail.
Of course, these are radically different in all fields that are
non-standard in any way and the bigger the service, the more
non-standard needs it has.
olaf
--
___ Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de ____
__ o <URL:http://www.inka.de/~bigred/> <IRC:praetorius>
__/<_ >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____
------------------------------
Date: 18 Oct 1997 07:58:49 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: Can someone look at this and tell me why it doesn't work!!
Message-Id: <toutatis-ya023180001810970958520001@news.euro.net>
In article <344248D5.470D@icl.fi>, petri.backstrom@icl.fi wrote:
> Jeff Gostin wrote:
> >
> > If this is an RTFM, point me at the FM, and I'll happily read away. I don't
> > suspect it is, and I suspect that the answer is 'no' because of PERL's lack
> > of specific data types, but here's the question:
> >
> > Is there a way to determine if a scalar (or an array element, or whatever)
> > contains a numeric sequence or an alphanumeric sequence?
>
> Sure. Read away in the part about regular expressions (perlre)
> in the FM...
Read the F thread to find out this F question has been thoroughly answered
before you give your F boring replies.
--
Toutatis
------------------------------
Date: Sat, 18 Oct 1997 01:11:53 -0500
From: mshavel@erols.com (Mike S)
Subject: Error Trapping with "die" and eval
Message-Id: <mshavel-ya02408000R1810970111530001@news.erols.com>
Hi all
Quick question. How do I trap a "die" error message into a variable. The
perl book says it is stored in the @# variable and to use eval to trap it
but I have not been able to figure out how to do that. Anyone have a
snippit of code they could show? Thanks very much.
Mike Shavel
mshavel@erols.com
------------------------------
Date: Sat, 18 Oct 1997 01:38:03 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Error Trapping with "die" and eval
Message-Id: <comdog-ya02408000R1810970138030001@news.panix.com>
In article <mshavel-ya02408000R1810970111530001@news.erols.com>, mshavel@erols.com (Mike S) wrote:
> Quick question. How do I trap a "die" error message into a variable. The
>perl book says it is stored in the @# variable and to use eval to trap it
>but I have not been able to figure out how to do that. Anyone have a
>snippit of code they could show? Thanks very much.
#!/usr/bin/perl
#move the print statement around to convince yourself
#from where the $@ value comes
eval { die "just another perl hacker" };
eval { die "just a dead horse" };
print $@;
__END__
just a dead horse at test.pl line 5.
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Sat, 18 Oct 1997 09:59:05 -0400
From: John Nolan <nospam@domain.com>
To: Jeff Girard <girardj@primenet.com>
Subject: Re: file compression and decompression
Message-Id: <3448C0A9.1565@domain.com>
Jeff Girard wrote:
> I am looking for a function that will take as input a series of
> filehandles, compress those files into one large file, and return that
> file. If I could have my cake and eat it too, I would like that compressed
> file to be a self-extractor. If not, then I would need the decompression
> function also.
If you are using Unix, then you can just make a direct system call,
something like this (substitute your own paths):
system "/usr/bin/zcat archive* | /usr/bin/gzip > big-archive.gz";
This will consecutively unzip all the files whose names are like
"archive*", and gzip all the output right back into the file
big-archive.gz.
If you want to make a self-extracting archive, then one program you can
use
is the freeware "Info-Zip" utility, available here:
http://www.cdrom.com/pub/infozip/ .
The command syntax for this utility is similar to PKZIP (and unlike
gzip).
It runs on every conceivable platform, just like Perl. You can even
create
DOS self-extracting archives right on the UNIX platform.
I'm not sure what the syntax is for a similar system call on NT,
but I'm sure it's possible.
-John Nolan
------------------------------
Date: Sat, 18 Oct 1997 10:00:52 -0400
From: John Nolan <nospam@domain.com>
To: Jeff Girard <girardj@primenet.com>
Subject: Re: file compression and decompression
Message-Id: <3448C114.460A@domain.com>
Jeff Girard wrote:
> I am looking for a function that will take as input a series of
> filehandles, compress those files into one large file, and return that
> file. If I could have my cake and eat it too, I would like that compressed
> file to be a self-extractor. If not, then I would need the decompression
> function also.
If you are using Unix, then you can just make a direct system call,
something like this (substitute your own paths):
system "/usr/bin/zcat archive* | /usr/bin/gzip > big-archive.gz";
This will consecutively unzip all the files whose names are like
"archive*", and gzip all the output right back into the file
big-archive.gz.
If you want to make a self-extracting archive, then one program you can
use
is the freeware "Info-Zip" utility, available here:
http://www.cdrom.com/pub/infozip/ .
The command syntax for this utility is similar to PKZIP (and unlike
gzip).
It runs on every conceivable platform, just like Perl. You can even
create
DOS self-extracting archives right on the UNIX platform.
I'm not sure what the syntax is for a similar system call on NT,
but I'm sure it's possible.
-John Nolan
jpn acm org
------------------------------
Date: Sat, 18 Oct 1997 08:58:48 -0400
From: John Nolan <nospam@domain.com>
Subject: Re: How to make a word bold?
Message-Id: <3448B288.72D2@domain.com>
John Robson wrote:
> I'm trying to search for a word in a text file and then change that word
> to bold. More precisely, print the line containing the word on the screen,
> but show the word in BOLD. I'm thinking maybe there is some kind of
> special ASCII code in MS-DOS or Unix that you can substitute to make
> something look "bold" or "underlined". How does a word processor do it
> anyway? How does a word processor translate from one document format to
> another and still preserve the word attributes? Maybe it's not a Perl
> question, but if Perl can do it, I'll be happy! :)
Yup, you're right, it's not a Perl question. A "text" file per se does
not
know anything about "bold" or "italic" or anything else. Text is text.
There is no generlized, standard way to make things bold.
Some text files happen to be HTML files, and in HTML you can surround
<b>important text</b> with HTML markup tags. Other text files happen
to be
RTF files an you can mark {\b screaming headlines} with markup tags as
well.
Postscript files are also basically text, and postscript uses its own
kind of tag. There are actually all kinds of text formats and markup
codes.
Then there are binary file formats, such as MS-Word *.doc files,
or WordPerfect files. Each of these formats probably uses its own
proprietary way of storing information about text formatting.
The reason word processing applications can understand each other's
encoding is because the manufacturers explicitly write converters,
which convert files from one format into another. Sometimes these
converters do their work behind your back, without you seeing them.
All you see is the result. But somehow, on some level, formatting
information like bold and italics are stored in some way.
If you want to cobble your own code for making things bold, it might
be pretty easy. But you need to know how "bold" is encoded in your
particular application. If it's HTML, then write code to insert
"<B>" and "</B>" into your text. If you're writing DOS batch programs
and you want to make bold or blinking text on your PC monitor,
then you need to insert special escape characters, which are specific
to PC's. If you don't know, your best bet is to find a newsgroup
which specializes in the application you're using.
Once you find out, then you can use Perl to write the code.
It just so happens that Perl is particularly good at manipulating
text in this way. :)
-John Nolan
------------------------------
Date: Sat, 18 Oct 1997 14:18:11 GMT
From: wkstone@world.com (W. K. Stone)
Subject: ITS AWESOME
Message-Id: <3448c50b.3472852@opl.ottawa.on.ca>
Do you have any idea what 42,000 one-dollar bills looks like piled
up on the kitchen table? ... IT'S AWESOME !!!
First of all, IT'S PERFECTLY LEGAL! (Call 1-800-725-2161) if you
have any questions about the following opportunity to make
$50,000.00 and that's WITHIN TWO MONTHS!
Here's my story:
A little while back, I was browsing these newsgroups, just like you
are now, and came across an article similar to this, that said you
could make thousands of dollars within weeks, with only an initial
investment of $5.00! So I thought, "Yeah, right, this must be a joke,"
but like most of us I was curious, so I kept reading. Anyway, it said
that you send $1.00 to each of the 5 names and address stated in the
article. You then place your own name and address in the bottom of the
list at #5, and post the article in at least 200 newsgroups. (There
are thousands) No catch, that was it.
I knew that this was the opportunity I had waited for.
I thought it was about time that the money of the world gets into the
right hands! OURS, right? I never had a doubt that this thing would
actually work and even if it didn't, what were 5 stamps and $5.00 for
a try?
As I mentioned before, like most of us, I was a little skeptical and
a little worried about the legal aspects of it all. So I checked it
out with the U.S. Post Office (1-800-725-2161) and they confirmed
that it is indeed legal!
Well GUESS WHAT!!... within 7 days, I started getting money in the
mail! I was shocked! I still figured it would end soon, and didn't
give it another thought. But the money just kept coming in. In my
first week, I made about $20.00 to $30.00 dollars. By the end of the
second week I had made a total of over $1,000.00!!!!!! In the third
week I had over $10,000.00 and it's still growing. This is now my
fourth week and I have made a total of just over $42,000.00 and it's
still coming in .......
Let me tell you how this works and most importantly, WHY
it works....also, make sure you print a copy of this article NOW, so
you can get the information off of it as you need it. The process is
very simple and consists of 3 easy steps:
STEP 1: Get 5 separate pieces of paper and write the following on each
piece of paper "PLEASE PUT ME ON YOUR MAILING LIST." Now get 5 $1.00
bills and place ONE inside EACH of the 5 pieces of paper so the bill
will NOT be seen through the envelope "to prevent thievery". Next,
place
one paper in each of the 5 envelopes and seal them. You should now
have 5 sealed envelopes, each with a piece of paper stating the above
phrase and a $1.00 bill. What you are doing is creating a service by
this. THIS IS PERFECTLY LEGAL!
Mail the 5 envelopes to the following addresses:
**IMPORTANT** Conceal the cash within the envelope!!!
#1
C. E. Burkman
170 University Ave. W
Suite 12-129
Waterloo, Ontario
N2L 3E9
#2
A. Bailey
1207 Reeves Road
Plainfield, IN 46168
#3
Anthony Lacks
644 Riverside Drive Apt.7B
New York,N.Y. 10031
#4
James F. MacLean
Apartment # 7
277 Highland Ave.
Somerville, MA 02143
USA
#5
W. K. Stone
7422 Rosemont
Dallas, TX
75217
STEP 2: Now take the #1 name off the list that you see above, move the
other names up (2 becomes 1, 3 becomes 2, etc...) and add YOUR Name as
number 5 on the list.
STEP 3: Change anything you need to, but try to keep this article as
close to original as possible. Now, post your amended article to at
least 200 newsgroups. (I think there is close to 43,000 groups) All
you need is 200, but remember, the more you post, the MORE money you
make!
For a "complete" Newsgroup listing: www.internet-now.com
*** BOTS ***
Bots are small computer programs on a usenet server.
1) Bots look for certain characters in the "Subject:" field of your
newsgroup posting.
2) Bots also look for "multiple postings".
3) If a Bot discovers any of the above, it will delete your posting.
4) Then send you a nasty email.
***OUTSMART THE BOTS***
1) You will make a lot MORE money if you outsmart the Bots.
2) Post your message only ONCE.
3) Do NOT use characters such as (! $ % + # & * @ ?) in the "Subject"
field.
4) This is what I use ---> Subject: ITS AWESOME
Don't know HOW to post in the newsgroups? Well do exactly the
following:
FOR AOL:
To post to a newsgroup from AOL is totally brainless.
Need I say more?
FOR INTERNET EXPLORER:
It's real easy, holding down the left mouse button, highlight this
entire article, then press the 'CTRL' key and 'C' key at the same time
to copy this article. Then print the article for your records to have
the names of those you will be sending $1.00 to.
Go to the newsgroups and press 'POST AN ARTICLE' then type in your
subject and click the large window below. Press 'CTRL' and 'V' and the
article will appear in the message window. **BE SURE TO MAKE YOUR
ADDRESS CHANGES TO THE 5 NAMES.** Now re-highlight the article and
re-copy it so you have the changes.... then all you have to do for
each newsgroup is 'CTRL' and 'V' and press 'POST'. It's that easy!!
THAT'S IT! All you have to do is jump to different newsgroups and post
away, after you get the hang of it, it will take about 30 seconds for
each newsgroup!
FOR FREE AGENT:
If these instructions are too complex to follow, try Forte's "Free
Agent."
This is a great program for posting to newsgroups.
It is a freeware program. To download it ---> www.forteinc.com
"Free Agent" is a VERY easy program to learn.
Public News Servers: Just do a "Search" and you will find hundreds
of these servers on the net.
**REMEMBER, THE MORE NEWSGROUPS YOU POST IN, THE MORE MONEY YOU WILL
MAKE!! BUT YOU HAVE TO POST A MINIMUM OF 200**
That's it! You will begin receiving money from around the world within
days! You may eventually want to rent a P.O. Box due to the large
amount of mail you receive. If you wish to stay anonymous, you can
invent a name to use, as long as the postman will deliver it. **JUST
MAKE SURE ALL THE ADDRESSES ARE CORRECT.**
Now the WHY part:
This entire principle works because it is in a format of an upside
down tree with thousands of branches. Everyone below you will see to
it that the tree continues because they want to get money. Those
below THEM will continue because THEY want to get the cash etc.
Out of 200 postings, say I receive only 5 replies (a very low
example). So then I made $5.00 with my name at #5 on the letter. Now,
each of the 5 persons who just sent me $1.00 make the MINIMUM 200
postings, each with my name at #4 and only 5 persons respond to each
of the original 5, that is another $25.00 for me, now those 25 each
make 200 MINIMUM posts with my name at #3 and only 5 replies each, I
will bring in an additional $125.00! Now, those 125 persons turn
around and post the MINIMUM 200 with my name at #2 and only receive 5
replies each, I will make an additional $626.00! OK, now here is the
fun part, each of those 625 persons post a MINIMUM of 200 letters
with my name at #1 and they each only receive 5 replies, that just
made me $3,125.00!!! With a original investment of only $5.00!
AMAZING! And as I said 5 responses is actually VERY LOW! Average is
probably 20 to 30! So lets put those figures at just 15 responses
per person. Here is what you will make:
at #5 $15.00
at #4 $225.00
at #3 $3,375.00
at #2 $50,625.00
at #1 $759,375.00
When your name is no longer on the list, you just take the latest
posting in the newsgroups, and send out another $5.00 to names on the
list, putting your name at number 5 and start posting again.
The thing to remember is that thousands of people all over the world
are joining the Internet and reading these articles everyday, JUST
LIKE YOU are now!! And this will go on and on and on and on.... get
the picture? Well, there's 5,000,000,000 people on the world and
most of them will eventually end up being hooked into the internet.
So there are virtually unlimited resources. Of course this will work
the best at the very beginning so the faster you post, the better for
YOU!
So can you afford $5.00 and see if it really works?? I think so!
People have said, "What if the plan is played out and no one
sends you the money?" So what! What are the chances of that happening
when there are tons of "new honest" users who are
joining the Internet and newsgroups everyday and are willing to
give it a try? Estimates are at 20,000 to 50,000 new users,
every day, with thousands of those joining the actual Internet.
Remember, play FAIRLY and HONESTLY and this will work. You just have
to be honest. Make sure you print this article out RIGHT NOW, also.
Try to keep a list of everyone that sends you money and always keep an
eye on the newsgroups to make sure everyone is playing fairly.
Remember, HONESTY IS THE BEST POLICY. You don't need to cheat the
basic idea to make the money!!
GOOD LUCK to all and please play fairly and reap the huge rewards from
this, which is tons of extra CASH. This is the fairest and most honest
way
I have ever seen to share the wealth of the world without costing
anything but our time!!!
Please remember to declare your extra income. Thanks once again...
------------------------------
Date: Sat, 18 Oct 1997 01:22:30 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Lookbehind
Message-Id: <comdog-ya02408000R1810970122300001@news.panix.com>
In article <1997101800091724918410N@roxboro-169.interpath.net>, phenix@interpath.com (John Moreno) wrote:
>I was reading the perl regular expression manual and it looks to me like
>perl doesn't have a look behind extension is this true?
that is true.
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Sat, 18 Oct 1997 07:19:09 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Lookbehind
Message-Id: <tf9a26.8h.ln@localhost>
John Moreno (phenix@interpath.com) wrote:
: I was reading the perl regular expression manual and it looks to me like
: perl doesn't have a look behind extension is this true?
^^^^^^^^^^^
grep lookbehind *.pod
...
perlre:
------------------------------------
=item (?!regexp)
A zero-width negative lookahead assertion. For example C</foo(?!bar)/>
matches any occurrence of "foo" that isn't followed by "bar". Note
however that lookahead and lookbehind are NOT the same thing. You cannot
use this for lookbehind: C</(?!foo)bar/> will not find an occurrence of
"bar" that is preceded by something which is not "foo". That's because
the C<(?!foo)> is just saying that the next thing cannot be "foo"--and
it's not, it's a "bar", so "foobar" will match. You would have to do
something like C</(?!foo)...bar/> for that. We say "like" because there's
the case of your "bar" not having three characters before it. You could
cover that this way: C</(?:(?!foo)...|^..?)bar/>. Sometimes it's still
easier just to say:
if (/foo/ && $` =~ /bar$/)
------------------------------------
So I am guessing that it is true ;-)
--
Tad McClellan SGML Consulting
tadmc@flash.net Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 18 Oct 1997 13:57:40 GMT
From: munn@bigfoot.com (Thomas Munn)
Subject: Most efficient way to parse large text files
Message-Id: <62afdo$m5s$1@nu-informer.alliance.net>
All:
I am writing a program to parse a text file, take out certain info, and then
write it to a file. Specifically: The text file is large (300k), what is the
best logic structure that will allow me to parse the file with my
"if/then/else statements to pick out the information that I need. I am
currently using the <> operator in conjunction with a while loop. Any better
methods??
One Idea I had was to write each area of info as a "subroutine" (e.g. each
item that I wanted) and then to call the <> operator to read in the
appropriate file, doing this for each piece of the file that I want.
Currently I have just one ugly while loop followed by a bunch of if/elseif
statements... This is my first perl program, and I am sure that there are
better ways to do this...
Thank you In Advance,
Thomas Munn
munn@bigfoot.com
------------------------------
Date: 16 Oct 1997 14:03:17 -0400
From: csmall@ans.net (Christopher Small)
Subject: Mutiprocessor seg fault
Message-Id: <625kt5$sml@doogie.aa.ans.net>
I am seeing an seg falt in perl scripts on a Multiprocessor Ultra 2 running
Solaris 2.5.1. The scripts run normally on single processor machines and
when the machine is quiet enough that only one proceesor is used. This bug
has shown up in perl5.003 and perl5.004_01
Does anyone know of a bug that can cause this problem?
Here is the state of the registers from the core file and where it crashes.
$r
g0 0x0 l0 0x0
g1 0x3 l1 0x20
g2 0x2a l2 0xd0d10
g3 0xb4400 Error l3 0xf4e08
g4 0x0 l4 0x3a
g5 0x0 l5 0x0
g6 0x0 l6 0x0
g7 0x0 l7 0x0
o0 0x0 i0 0xeffffc38
o1 0xb4788 Perl_psig_ptr+0x124 i1 0x7bba4 Perl_pp_open+0xf0
o2 0x0 i2 0xb9e50 Perl_yyval+0x538c
o3 0xb4800 Perl_psig_ptr+0x19c i3 0xdb908
o4 0xca408 i4 0x0
o5 0x0 i5 0xb4400 Error
sp 0xeffffbd0 fp 0x60
o7 0x559b8 Perl_do_readline+0x4bc i7 0xd8ee8
y 0x0
tstate: 4482001a05 (ccr=0x44, asi=0x82, pstate=0x1a, cwp=0x5)
pstate: ag:0 ie:1 priv:0 am:1 pef:1 mm:0 tle:0 cle:0 mg:0 ig:0
npc 0x559dc Perl_do_readline+0x4e0: ldub [%o0 + 0x57], %o0
$C
Perl_do_readline() + 4dc
[savfp=0x0,savpc=0x0]
data address not found
================================================================================
====
gdb reports segmentation fault in Perl_do_readline () at pp_hot.c:1183
--Chris Small
------------------------------
Date: 18 Oct 1997 13:08:14 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: Re: Mutiprocessor seg fault
Message-Id: <62acbu$l5n$1@daily.bbnplanet.com>
Christopher Small (csmall@ans.net) wrote:
: I am seeing an seg falt in perl scripts on a Multiprocessor Ultra 2 running
: Solaris 2.5.1. The scripts run normally on single processor machines and
: when the machine is quiet enough that only one proceesor is used. This bug
: has shown up in perl5.003 and perl5.004_01
: Does anyone know of a bug that can cause this problem?
: Here is the state of the registers from the core file and where it crashes.
It might have been very useful if you could have shown the script that
is seg faulting Perl, as well as what compiler was used to compile your Perl
binary. You aren't giving enough context to be helpful unless this has been
seen before.
Jason Gloudon
------------------------------
Date: 18 Oct 1997 06:06:52 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: qqq
Message-Id: <629jls$8cu$1@agate.berkeley.edu>
In article <eli$9710172317@qz.little-neck.ny.us>,
Eli the Bearded <usenet-tag@qz.little-neck.ny.us> wrote:
> > s d #use lc('D')!
> > ^
> > (some)
> > d$1 new yorkdx;
> >
> > it works for me despite the Blue Camel p. 41.
>
> That simplifies things, probably to keep matters sane, possibly for
> compatibility across several versions.
>
> You can add this fun second statement, too:
>
> s sSsSssi;
>
> Even by my standards, that one is very cruel. (Ilya, are you reading this?
> Are you going to patch the emacs syntax highlighting to deal with this?
> Somehow I really doubt it does currently.)
I did too, but it does!
Enjoy,
Ilya
------------------------------
Date: 18 Oct 1997 08:15:25 -0500
From: John Goerzen <jgoerzen+usenet@complete.org>
Subject: Reading from an already-open file
Message-Id: <87hgaf6wlu.fsf@garfield.complete.org>
Hi,
Another question for y'all...
I have a situation where a program will invoke my script with file
descripter 3 pre-opened to a certain file that I need to write to.
Under C, I could simply do write(3, ....) and it would work.
However, under Perl, it seems to always want a Perl file handle
instead of a file descriptor number. I cannot use open since it is
already open. Is there a way to assign an already-open file
descriptor to a Perl file handle? Or, is there a way to read from and
write to a file descriptor without using a Perl file handle?
Thanks,
John
--
John Goerzen | Running Debian GNU/Linux (www.debian.org)
Custom Programming | Debian GNU/Linux is a free replacement for
jgoerzen@complete.org | DOS/Windows -- check it out at www.debian.org.
------------------------------
Date: 17 Oct 1997 23:53:57 -0500
From: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: Searching Perl(5) grammar
Message-Id: <629fd5$ptj@abattoir.cc.ndsu.nodak.edu>
Keywords: parse
[courtesy copy e-mailed to author(s)]
In comp.lang.perl.misc, Randal Schwartz <merlyn@stonehenge.com> wrote:
>>>>>> "Chip" == Chip Salzenberg <chip@rio.atlantic.net> writes:
>
>Chip> According to Gerd Weishaar <weishaar@soft.uni-linz.ac.at>:
>>> I'm searching for a Perl grammar with the purpose to develope an
>
>Chip> That's because Perl itself is tricky and difficult to parse.
>
>>> [I'd be surprised if anything much simpler than the parser in perl5 could
>>> correctly parse perl5. -John]
>
>Chip> Good call. Some parser decisions depend on such factors as whether
>Chip> a given package (class) has been defined yet.
>
>You forgot "phase of the moon", "remaining supply of smoke for
>smoke-and-mirrors", and "relative Bacon number".
Hmm... let's do the '5 steps to Kevin Bacon' using you as a starting
person. Let's see .. Randal wrote "Programming Perl", which was
co-authored by Larry Wall. Larry was in "Dr. Dobbs Journal" .. and I'm
sure Satan (Bill Gates) has been mentioned in it as well. Satan has been
interviewed by Tom Brokaw, and Tom has been on the Dave Letterman show, and
so has Kevin Bacon! Hey!
My relative Bacon number is something like 20. :-(
:-)
--
Nem W Schlecht nem@plains.nodak.edu
NDUS UNIX SysAdmin http://www.nodak.edu/~nem
"Perl did the magic. I just waved the wand."
------------------------------
Date: 18 Oct 1997 03:23:15 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: Searching Perl(5) grammar
Message-Id: <8cu3ef2wvg.fsf@gadget.cscaper.com>
>>>>> "Nem" == Nem W Schlecht <nem@abattoir.cc.ndsu.nodak.edu> writes:
Nem> Hmm... let's do the '5 steps to Kevin Bacon' using you as a starting
Nem> person. Let's see .. Randal wrote "Programming Perl", which was
Nem> co-authored by Larry Wall. Larry was in "Dr. Dobbs Journal" ..
Oh, then we can shorten that. I was the subject of a editorial
about my legal case in DDJ.
Nem> and I'm sure Satan (Bill Gates) has been mentioned in it as
Nem> well. Satan has been interviewed by Tom Brokaw, and Tom has been
Nem> on the Dave Letterman show, and so has Kevin Bacon! Hey!
Looks like I'm 4 hops from Bacon. Mmmmm, smell the bacon!
Nem> My relative Bacon number is something like 20. :-(
No, you've posted in the same newsgroup as me! Makes you 5. :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 318 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Sat, 18 Oct 1997 01:18:57 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: What kind of string will work ?
Message-Id: <comdog-ya02408000R1810970118570001@news.panix.com>
In article <344834F5.1E75@bekkoame.or.jp>, Mic <nishin@bekkoame.or.jp> wrote:
>I would like to ask someone out there if they can tell me what this
>string means.
>if ($input = /~user=(.*)&newpasswd1=(\S*)&newpasswd2=(\S*)\s*$/){
perhaps you wanted "$input =~" in place of "$input = "?
>What kind of string is valid.
well, let's rewrite it as an eXtended regular expression and see
what its bits do [code below]. it looks like it's trying to match
some CGI data:
#!/usr/bin/perl
#some of these strings are valid, and some aren't.
@strings = qw( ~user=&newpasswd1=&newpasswd2=
~user=brian&newpasswd1=foo&newpasswd2=
~user=brian&newpasswd1=foo&newpasswd2=bar
user=brian&newpasswd1=foo&newpasswd2=bar
~user=brian&newpasswd1=&newpasswd2=bar
just+some+new+york+perl+hackers
);
foreach( @strings )
{
if(
/ # start of regex, bound to $_ by default
~ #a twiddle
user #literal 'user'
= #an equal sign
(.*) #0 or more anythings greedily captured into $1
& #an ampersand
newpasswd1 #literal 'newpasswd1'
= #an equal sign
(\S*) #0 or more not-whitespaces greedily captured into $2
& #an ampersand
newpasswd2 #literal 'newpasswd2'
= #an equal sign
(\S*) #0 or more not-whitespaces greedily captured into $23
\s* #0 or more whitespace characters
$ #end of string anchor
/x # end of eXtended regex - it let's us use whitespace
# to break the regex up into its peices
){ print "$_ matches [$1,$2,$3]\n" }
}
__END__
~user=&newpasswd1=&newpasswd2= matches [,,]
~user=brian&newpasswd1=foo&newpasswd2= matches [brian,foo,]
~user=brian&newpasswd1=foo&newpasswd2=bar matches [brian,foo,bar]
~user=brian&newpasswd1=&newpasswd2=bar matches [brian,,bar]
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
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 1193
**************************************