[7116] in Perl-Users-Digest
Perl-Users Digest, Issue: 741 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 17 13:17:19 1997
Date: Thu, 17 Jul 97 10:00:23 -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 Thu, 17 Jul 1997 Volume: 8 Number: 741
Today's topics:
$$$$$$$ NEW SYSTEM, BETTER THAN "ADD ME TO YOUR MAILING a18@a.a
Re: 2 xor 0 -> 1 (??) (Grant Reaber)
Re: A script to change passwd <rra@stanford.edu>
Re: Am I looking for something thats not there? <tex@collegenet.com>
CHALLENGE! need help on streaming text for a web based <eric@twd.net>
Database Size <upsetter@zip1.ziplink.net>
Flock() and DBM <timi@cygnet.co.uk.com>
Re: Flock() and DBM <pspierce@mindspring.net>
Re: function pointer dereferencing (M.J.T. Guy)
how to build database <ssheikh@netcomuk.co.uk>
Re: Index a hash by a regex ? (Even Holen)
Re: Learning Perl ..Help?? (Charles Lin)
LoL dynamic generation in Perl 4 R36 <gremio@Glue.umd.edu>
Override builtin functions conditionally <axel@ramge.de>
Perl 5.004 & Sybperl 2.07 <ar@pine.dk>
Problem making Tcl module <prasad@stro5.vub.ac.be>
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: substition question (Tung-chiang Yang)
Using varaibles from a template file <perrella@ehsn28.cen.uiuc.edu>
Re: What is--->> 19.483u 0.216s 0:12.71 154.9% 0+0k 0+ <lyonsj@bgnet.bgsu.edu>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 13 Jul 97 18:16:17 GMT
From: a18@a.a
Subject: $$$$$$$ NEW SYSTEM, BETTER THAN "ADD ME TO YOUR MAILING LIST" $$$$$$$
Message-Id: <33c91b71.0@news.unibe.ch>
I have participated in the standard "Please put me on your mailing list" letter and found it to be worth
my time (I get 1 or 2 handfulls or letters every day) but I also found that it's results were nowhere
near what I expected due mainly to people not sending in the money but rather spreading the letter
without paying for it. I participated in that mainly as an experiment and found that there are a
tremendous amount of people willing to do it. I thought about how to, first, eliminate the "non-pay"
problem and, second, to create a monthly income. I came upon the solution and decided to start a new
program. I decided that there were 3 things that this new program needed in order to work for everyone
and they were: 1.) It needed to be very simple and easy for anyone to do, and, 2.) It needed to be
inexpensive enough for even the poorest of people, and, 3.) It needs to be DUPLICATABLE. I think you
will find this program to meet those requirements. I have put lots of thought into it and I ask that you
PLEASE do NOT modify it. This WILL WORK if you follow it. This system is based on the unconditional
"loaning" of money to people. Simply say, "I am loaning you this $2 as an act of goodwill to help you in
your financial need, you may pay me back if and when you can." You should find 5 or more people who will
send $2 to the 5 needy people on this list AND MAINTAIN 5 or more people who will do the same. You
should put your name on postition number 5 and move each of the other names up one position. The name
originally on position number 1 gets removed. You should be able to contact each of your 5 or more
people to see if they are going to be active this month. If not then you need to find one or more people
to be active in order to maintain at least 5. I am not speaking about the 5 people on the list but
rather the 5 new people you have found. I would highly suggest having more than 5 in any given month.
Now I know that this would be extremely easy to do since I can think of at least 20 people myself who
will do this consistently. The key is to maintain at LEAST 5 active people. If you don't then you can't
expect for the rest of the people to do it either and you can't expect for this system to work. This
system is a no-brainer, and if someone can't afford the $10 + stamps for this then they truly ARE in
need! It is OK to use the internet to find people but I think it would be easier to find them through
people that you know. This way it will be easier for you to contact them every month to ask about their
being active, unless someone is willing to give you their e-mail address. Here are some numbers:
-----------------------------------------------------------------------------------------------------
Monthly income model per level and total for maintaining 4 active members @ $2 each:
Level 1: $2 x 4 people = $8, Total now $8
Level 2: $2 x 16 people = $32, Total now $8 + $32 = $40
Level 3: $2 x 64 people = $128, Total now $8 + $32 + $128 = $168
Level 4: $2 x 256 people = $512, Total now $8 + $32 + $128 + $512 = $680
Level 5: $2 x 1024 people = $2048, Total now $8 + $32 + $128 + $512 + $2048 = *** $2728 ***
Yearly income: $2728 x 12 months = $32,736
------------------------------------------------------------------------------------------------------
Monthly income model per level and total for maintaining 5 active members @ $2 each:
Level 1: $2 x 5 people = $10, Total now $10
Level 2: $2 x 25 people = $50, Total now $10 + $50 = $60
Level 3: $2 x 125 people = $250, Total now $10 + $50 + $250 = $310
Level 4: $2 x 500 people = $1000, Total now $10 + $50 + $250 + $1000 = $1310
Level 5: $2 x 2500 people = $5000, Total now $10 + $50 + $250 + $1000 + $5000 = *** $6310 ***
Yearly income: $6310 x 12 months = $75,720
------------------------------------------------------------------------------------------------------
Monthly income model per level and total for maintaining 6 active members @ $2 each:
Level 1: $2 x 6 people = $12, Total now $12
Level 2: $2 x 36 people = $72, Total now $12 + $72 = $84
Level 3: $2 x 216 people = $432, Total now $12 + $72 + $432 = $516
Level 4: $2 x 1296 people = $2592, Total now $12 + $72 + $432 + $2592 = $3108
Level 5: $2 x 7776 people = $15552, Total now $12 + $72 + $432 + $2592 + $15552 = *** $18660 ***
Yearly income: $18660 x 12 months = $223,920
------------------------------------------------------------------------------------------------------
Monthly income model per level and total for maintaining 7 active members @ $2 each:
Level 1: $2 x 7 people = $14, Total now $14
Level 2: $2 x 49 people = $98, Total now $14 + $98 = $112
Level 3: $2 x 343 people = $686, Total now $14 + $98 + $686 = $798
Level 4: $2 x 2401 people = $4802, Total now $14 + $98 + $686 + $4802 = $5600
Level 5: $2 x 16807 people = $33614, Total now $14 + $98 + $686 + $4802 + $33614 = *** $39214 ***
Yearly income: $39214 x 12 months = $470,568
------------------------------------------------------------------------------------------------------
Keep in mind that it does not matter what day of the month that someone chooses to be active. It DOES
matter that they are active on that day EVERY month. The key to this is DUPLICATION! You must treat this
as a business. If you treat it like a hobby that is how it will treat you. You could even organize small
meetings with your people and their prospects and work with your leaders.
Think of how easy this would be for you, how reasonable this is, and of how good the chances are of it
working for you. You may need to hire someone to open all the envelopes.
NOTE: I decided on $2 instead of $1 because it is more feasible and it won't matter much for someone to
send $2 as opposed to $1. Also I was against $5 as that becomes too expensive to duplicate.
Mail $2 every month with a piece of paper saying "I am loaning you this $2 as an act of goodwill to help
you in your financial need, you may pay me back if and when you can" to the following needy people:
#1 Robert Jezil
114 Jefferson Ave.
Slidell, LA 70460
#2 Phil Walther Jr.
9495 Annapolis Lane North
Maple Grove, MN 55369
#3 C. E. Burkman
170 University Ave. W
Suite 12-129
Waterloo, Ontario
N2L 3E9
#4 A. Bailey
1207 Reeves Road
Plainfield, IN 46168
#5 J. Martin
P.O. Box 2292
Reston, Va. 20195
------------------------------
Date: Wed, 16 Jul 1997 17:23:19 -0600
From: greaber@reed.edu (Grant Reaber)
Subject: Re: 2 xor 0 -> 1 (??)
Message-Id: <869089468.5406@dejanews.com>
In article <33CB9B2F.1316332F@absyss.fr>,
Doug Seay <seay@absyss.fr> wrote:
>
> non-numeric values. With AND and OR there are (fairly) obvious values,
> but the XOR concept requires some interaction between the two operands.
> Maybe something like both are TRUE or both are FALSE, return FALSE,
> otherwise return the one that is TRUE. In that case "2 XOR 0" would
Well, duh.
> I'd like to see a ^^ to round out && and ||, but I think that is just
> the consistancy hobgoblin. This partially comes from me not liking
> "and" and "or", I use punctuation and parens. But since ^^ couldn't
> short circuit, maybe that would be a bigger inconsistancy.
Someone else said a similar thing about ^^. But it's ridiculous. The
only difference between the symbol operators and the word operators is
precedence. It would definitely be more consistent to have ^^. In fact,
since xor doesn't have a short-circuit function, if both ^^ and xor
existed, I would bet ^^ would be a lot more used.
I'm curious how many people use xor. I've never actually used it. But I
would imagine that if it's useful at all, an interesting return value
would be useful too. The only reasonable objection I've seen is the one
I brought up myself that you can't really do the same thing for false
values.
So -- is everyone in this thread just making stuff up like me, or do some
of you actually use this funny operator?
Grant
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: 16 Jul 1997 17:07:25 -0700
From: Russ Allbery <rra@stanford.edu>
To: dsamani <dsamani@nc.com>
Subject: Re: A script to change passwd
Message-Id: <m3zprmzgle.fsf@windlord.Stanford.EDU>
[ Posted and mailed. ]
dsamani <dsamani@nc.com> writes:
> Would anybody know how to change the following script so it reads from
> the passwd program, and writes to it ? Any help is greatly appreciated.
Well, this is a somewhat inherently tricky thing to do in Perl (we really
need a module with the full functionality of Expect), but there is one
obvious problem with your code:
> use FileHandle;
> use IPC::Open2;
> $NewPass="A_String_2";
> $SomeUserNAme="MyName";
> $pid=open2( \*Reader, \*Writer, "passwd $SomeUserName" );
Did you read the following from the IPC::Open2 documentation?
WARNING
It will not create these file handles for you. You have to do this
yourself. So don't pass it empty variables expecting them to get
filled in for you.
I'd recommend instead doing:
$reader = new FileHandle;
$writer = new FileHandle;
$pid = open2 ($reader, $writer, 'passwd', $username);
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Wed, 16 Jul 1997 18:59:40 -0700
From: Austin Schutz <tex@collegenet.com>
Subject: Re: Am I looking for something thats not there?
Message-Id: <33CD7C8C.2F8B@collegenet.com>
Nathan Stanford wrote:
>
> Is there a way with perlis.... and win 32 (NT,95) to inside a browser in
> a html file execute a perl command????
>
Probably. Check your web server manual for 'Server side includes' or
SSI.
BTW this is really a cgi-related question. You may find people in the
comp.infosystems.www.authoring.cgi or
comp.infosystems.www.servers.ms-windows or other cgi newsgroups have
more knowledge about this and may be able to point you in a more
specific direction.
Tex
------------------------------
Date: Thu, 17 Jul 1997 12:07:26 -0400
From: Eric Blue <eric@twd.net>
Subject: CHALLENGE! need help on streaming text for a web based cgi chat server
Message-Id: <33CE433D.5F0D@twd.net>
Ok, PERL gurus! I am working on a project to allow
streaming(scrolling) text for a cgi chat server in a
multi-framed HTML document. I have seen several
client / server models and sample code, but cannot seem
to get it straight. The problem I see with many of the
sample daemons is that they create way too much server
load. ex. The have to spawn a child process to
communicate with a newly opened socket. I need a
server to accept incoming sockets and to print messages
recieved from a socket to all other open connections
from ONE process(I guess this would be similar to the
innd process). I will be INCREDIBLY grateful for some
advice as this is an extremely important feature for me to
add. Thank you very much.
---------------------------------- Text Omitted .... Code needing fixed
is listed below
Mark, I feel the code is almost there, but it has bugs in
it. I've set the server to listen
on a particular port. Rather then writing the client,
I've just telneted in to test the
response. Once the socket is opened, I type in data(then
of course the steam will be
ended via a \n) and the data is sent back to my socket
and it is then closed. For some
reason the text is not being broadcasted to other open
connections. I'd really
appreciate further help if it is possible. Also, once
completed this version should be
able to support up to and even beyond 50 - 100
simultaneous users. Is this feasable
with this implementation. Here is my code so far. Can you
please take a minute and
test this. Thank you greatly! - Eric
#!/usr/bin/perl
($port) = @ARGV;
$port = 2345 unless $port;
$AF_INET = 2;
$SOCK_STREAM = 1;
$sockaddr = 'S n a4 x8';
($name, $aliases, $proto) = getprotobyname('tcp');
if ($port !~ /^\d+$/) {
($name, $aliases, $port) = getservbyport($port,
'tcp');
}
print "Port = $port\n";
$this = pack($sockaddr, $AF_INET, $port, "\0\0\0\0");
socket(LISTEN, $AF_INET, $SOCK_STREAM, $proto) || die
"socket: $!";
bind(LISTEN,$this) || die "bind: $!";
listen(LISTEN,5) || die "connect: $!";
select(LISTEN); $| = 1; select(stdout);
print "Listening for connections....\n";
while (1) {
# each time, create the select bit array
$bits = 0;
for (@CLIENTS) {
vec ($bits, fileno ($_), 1) = 1;
}
vec ($bits, fileno (LISTEN), 1) = 1;
#OK, wait until something comes in.
$nfound =
select($rbits=$bits,undef,$ebits=$bits,undef);
#OK, something woke us up.
# see if it is a new connection...
if (vec($rbits, fileno(LISTEN), 1)) {
# new connection
accept (NS, LISTEN);
push (@CLIENTS, NS); }
#no, try the clients
$incoming = undef;
for (@CLIENTS) {
if (vec ($rbits, fileno ($_), 1)) {
#OK, this client's got something, read a line...
$incoming .= <$_>; } }
# next, send $incoming to all clients...
if ($incoming) {
for (@CLIENTS) {
print $_ "$incoming\n"; } }
}
------------------------------
Date: 13 Jul 1997 19:44:16 GMT
From: Scratchie <upsetter@zip1.ziplink.net>
Subject: Database Size
Message-Id: <5qbb6g$12g$1@kayrad.ziplink.net>
Greetings;
I have a small (200-500 record) calendar "database" on my website (the URL
is below). Because of the size of the database, I have found it expedient
to simply store the data in a text file and, when performing searches, to
read the whole datafile into an array and check each record to see if it
matches the search criteria.
If you check out my page, I think you'll find that the performance is
generally good, and I'm perfectly content to leave my own calendar in this
form. However, were the database to get larger and larger, this method
would soon start to bog down, I'm sure.
So here's the deal: I've been asked to do something similar with a
company's catalog (place it on line in a searchable format). Since I don't
have any concrete experience with anything larger than my own page, I'm
posting here to share the experience of others.
Does anybody have a good idea of how big a database should be before it's
worth (a) generating sub-indices to speed searching and/or (b) porting it
from a text file to a "real" database?
In the example I have to deal with, the company has about 5000 records,
and the platform is NT so (I believe) DBM databases are not available to
me.
Any ideas? Suggestions? Any and all comments would be gratefully
appreciated.
Thanks in advance,
--Art
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------
------------------------------
Date: 13 Jul 1997 17:46:33 GMT
From: "Timi Agama" <timi@cygnet.co.uk.com>
Subject: Flock() and DBM
Message-Id: <01bc8fb4$02cff680$0b01a8c0@tim>
I am writing a CGI application that stores its data in dbm files. Although,
updates are expected to be fairly infrequent (probably every quarter) I am
somewhat concerned about the possibility of corruption when reads/writes
are taking place at the same time.
In this scenario would flock() do the trick? Any advice/help would be
greatly appreciated.
--
Regards
Timi
timi@cygnet.co.uk
TGL Multimedia, London UK
Web Developer/Consultant
------------------------------
Date: Sun, 13 Jul 1997 16:10:15 -0400
From: Patrick Scott Pierce <pspierce@mindspring.net>
To: Timi Agama <timi@cygnet.co.uk.com>
Subject: Re: Flock() and DBM
Message-Id: <33C93627.428F9291@mindspring.net>
If you are using 'tie' it should be handled via fcntl.
Patrick Scott Pierce
Timi Agama wrote:
>
> I am writing a CGI application that stores its data in dbm files. Although,
> updates are expected to be fairly infrequent (probably every quarter) I am
> somewhat concerned about the possibility of corruption when reads/writes
> are taking place at the same time.
>
> In this scenario would flock() do the trick? Any advice/help would be
> greatly appreciated.
> --
> Regards
>
> Timi
> timi@cygnet.co.uk
> TGL Multimedia, London UK
> Web Developer/Consultant
------------------------------
Date: 17 Jul 1997 07:10:35 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: function pointer dereferencing
Message-Id: <5qkghb$6if@lyra.csx.cam.ac.uk>
Keywords: references, functions, dereferencing
Steven Elliot Pav <pav@LAS.alfred.edu> wrote:
>
>can anybody think of some good reason(s) why perl shouldn't allow
>function pointer dereferencing in a way similar to the `shortcut'
>dereferencing for array and hash references?
Current Perls do this. Your example prints
hello, Tom, Randal, Larry!
under Perl5.004 onwards.
Mike Guy
------------------------------
Date: Thu, 17 Jul 1997 16:52:23 +0100
From: Sanjeel Sheikh <ssheikh@netcomuk.co.uk>
Subject: how to build database
Message-Id: <33CE3FB6.E4CBA92E@netcomuk.co.uk>
i am trying to build an online catalogue and i have been working with
perl and cgi. i just wanted to know what database should i use and what
lib file should i use. i know how to develop gateway between files.
please mail reply
thanx in advance
------------------------------
Date: 17 Jul 1997 15:59:00 GMT
From: evenh@ra.pvv.ntnu.no (Even Holen)
Subject: Re: Index a hash by a regex ?
Message-Id: <slrn5ssg6r.qav.evenh@ra.pvv.ntnu.no>
In article <33CE03A0.41C6@adc.metrica.co.uk>, Simon Fairey wrote:
>I am wondering if it is possible to index a hash by a regex. Currently I
>am using grep to generate an array of keys which match the regex and
>then using that array to index the hash and return an array of the
>values. i.e.
>
>@names = grep( /something/, keys %hash );
>@values = @hash{@names};
>
>Basically I am looking into ways of speeding up the above.
You could try using a while loop and build the @values array whilst
running the loop. Something like:
while (($key, $value) = each %hash) {
if ($key =~ /something/o) {
push @values, $value;
}
}
Whether this speeds up or not I'm not quite sure but I guess it's worth
trying. In theory it should be faster since it only traverses the %hash
array once, and doesn't use an extra array @names. Try using the
Benchmark-module on both methods and see which is fastest...
Hope this helps! (Do also note the use of o as an option to the regexps
to speed it up a little...)
Regards,
Even Holen
--
<>< Even Holen, evenh@pvv.ntnu.no, http://www.pvv.ntnu.no/~evenh/ :-)
------------------------------
Date: 17 Jul 1997 16:12:02 GMT
From: clin@cs.umd.edu (Charles Lin)
Subject: Re: Learning Perl ..Help??
Message-Id: <5qlg8i$pv7@mimsy.cs.umd.edu>
Randal Schwartz (merlyn@stonehenge.com) wrote:
[...]
|| The first chapter lets the reader discover within the first hour of
|| reading the book a number of basic concepts about the product, backed
|| up by a sample walkthrough illustrating said concepts through
|| examples. It is not meant as a learning tool -- more of an
|| *orientation* tool... to let you know if you should even be reading
|| the book.
Well, it had me a little nervous reading that chapter because I
thought I shouldn't be reading the book. But once I got past the
first chapter (I probably skipped it after reading a few pages), it
was much nicer. In fact, it was nice that this book came out, because
Programming Perl doesn't read easily enough for a novice (at least,
for me). However, once you get through Learning Perl, then Programming
Perl is not too bad to read.
|| I first developed that style when I was writing product
|| documentation... on the cover sheet in bold letters it said "if you
|| don't do anything else, at least read THIS chapter"... because we all
|| know that nobody reads product documentation all the way through. :-)
At least, if you're lucky enough to get product documentation.
|| If the style has leaked into other ORA books, it's got to be because
|| Steve's next job after working for me was working alongside Tim
|| O'Reilly, from whence O'Reilly and Associates has sprung forth. :-)
And the rest, as they say,....
Anyway, nice book. Too bad, my copy is missing. However, it gives
me an excuse to get the second edition....
--
Charles Lin
clin@cs.umd.edu
------------------------------
Date: Sun, 13 Jul 1997 13:25:43 -0400
From: Greg Marton <gremio@Glue.umd.edu>
Subject: LoL dynamic generation in Perl 4 R36
Message-Id: <Pine.SOL.3.95q.970713131514.23876C-100000@avalon.eng.umd.edu>
I'm working in
|
| avalon ..gremio/home> perl -v
|
| This is perl, version 4.0
|
| $RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
| Patch level: 36
|
and am at the mercy of my sysadmins in this respect so I don't think an
upgrade to 5 will come as quickly as I need it, thus:
I'm trying to generate a List of Lists on the fly. I'm used to this being
rather simple, as in:
while (<>) {
@tmp = split;
push @LoL, [ @tmp ];
}
My Perl, though, doesn't like this. It also doesn't like the double
subscript references, as in $LoL[0][1] :
syntax error in file ee at line 132, next 2 tokens "]["
as the motto of the language is TMTOWTDI, I'm looking for one that'll work
with my version of Perl.
Thanks very much in advance.
Gremio
--
p |\ _,,,---,,_ Gregory A. Marton Santirix Gremionis
u /,`.-'`' -. ;-;;,_ http://www.glue.umd.edu/~gremio
r |,4- ) )-,_..;\ ( `'-' Support Free Speech Online! www.eff.org
r '---''(_/--' `-'\_) Not representing Info Tech or U of MD.
------------------------------
Date: Thu, 17 Jul 1997 06:57:10 -0600
From: Axel Ramge <axel@ramge.de>
Subject: Override builtin functions conditionally
Message-Id: <869139859.5535@dejanews.com>
Hello,
this is a small snippet of code which overrides a builtin function.
It works but I don't really understand why. So why?
----- Override.pm ---------------------------------------------------
package Override;
use Exporter ();
@ISA = qw(Exporter);
@EXPORT_OK = qw($DEBUG rename);
sub rename {
if ($^O =~ /OS2/) {
print STDERR "OS/2 rename: MV\n" if $DEBUG;
return (! system("mv $_[0] $_[1]")); # returns negated exit of "move"
} elsif ($^O =~ /MSWin32/) {
print STDERR "Windoze rename: MOVE\n" if $DEBUG;
return (! system("move $_[0] $_[1]"));
} else {
print STDERR "Generic rename\n" if $DEBUG;
rename($_[0], $_[1]); # built in rename 1: success, 0: failure
# &rename; This will *not* work: infinite recursion.
}
}
1;
--------------------------------------------------------------------
If any of the special cases matches it's clear but in the generic case
it calls "magically" (i.e. I don't understand it) the builtin rename().
This works only if the arguments are passed explicitly and not with
implicit passing of @_. When using &rename it ends in an infinite loop.
Is this clean code or is there a better way to use the builtin function?
Something like &builtin::rename?
Thanks
Axel
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 17 Jul 1997 14:45:54 +0200
From: "News" <ar@pine.dk>
Subject: Perl 5.004 & Sybperl 2.07
Message-Id: <869143459.441799@oak>
Anybody managed to get sybperl 2.07 working together with Perl 5.004?
Ant.
Please CC my email address: ar@pine.dk
------------------------------
Date: Sun, 13 Jul 1997 21:17:48 +0200
From: Prasad Alavilli <prasad@stro5.vub.ac.be>
Subject: Problem making Tcl module
Message-Id: <33C929DC.3A02@stro5.vub.ac.be>
Hello,
I am trying to make and install the Tcl and TclTk modules
with Perl5.004_01 on HP, but end up with the following problem
during the make: here is what all happens
>>>> make
mkdir ./blib
mkdir ./blib/lib
mkdir ./blib/arch
mkdir ./blib/arch/auto
mkdir ./blib/arch/auto/Tcl
mkdir ./blib/lib/auto
mkdir ./blib/lib/auto/Tcl
mkdir ./blib/man3
cp Tcl.pm ./blib/lib/Tcl.pm
/usr6/prasad/bin/perl
-I/usr6/prasad/libs/perl5/PA-RISC1.1/5.00401 -I/usr6/prasad/libs/perl5
/usr6/prasad/libs/perl5/ExtUtils/xsubpp -typemap
/usr6/prasad/libs/perl5/ExtUtils/typemap -typemap typemap Tcl.xs >Tcl.tc
&& mv Tcl.tc Tcl.c
Please specify prototyping behavior for Tcl.xs (see perlxs manual)
cc -c -I/usr6/prasad/tools/tcltk/include -D_HPUX_SOURCE -Aa
-I/usr/local/include -O -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" +z
-I/usr6/prasad/libs/perl5/PA-RISC1.1/5.00401/CORE Tcl.c
Running Mkbootstrap for Tcl ()
chmod 644 Tcl.bs
LD_RUN_PATH="/usr6/prasad/tools/tcltk/lib:/lib/pa1.1" ld -o
./blib/arch/auto/Tcl/Tcl.sl -b -L/usr/local/lib Tcl.o
-L/usr6/prasad/tools/tcltk/lib -ltcl -lm
collect2: ld returned 1 exit status
/bin/ld: Invalid loader fixup for symbol "$0000008B".
*** Error exit code 1
Stop.
Could someone out there help me get past this. Thanks.
------------------------------
Date: 13 Jul 1997 19:38:36 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <5qbars$fl9$1@info.uah.edu>
Following is a summary of articles spanning a 7 day period,
beginning at 05 Jul 1997 12:10:36 GMT and ending at
12 Jul 1997 22:41:48 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" e-mail address and name.
- Original Content Rating is the ratio of the original content volume
to the total body volume.
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Find the NewsScan junkyard at http://www.cs.uah.edu/~gbacon/clpm/
Excluded Posters
================
perlfaq-suggestions@mox.perl.com
Totals
======
Total number of posters: 440
Total number of articles: 872 (244 with cutlined signatures)
Total number of threads: 406
Total volume generated: 1602.6 kb
- headers: 558.7 kb (11,881 lines)
- bodies: 981.8 kb (27,810 lines)
- original: 783.7 kb (21,972 lines)
- signatures: 60.3 kb (1,499 lines)
Original Content Rating: 0.7983
Averages
========
Number of posts per poster: 2.0
Number of posts per thread: 2.1
Message size: 1882.0 bytes
- header: 656.1 bytes (13.6 lines)
- body: 1152.9 bytes (31.9 lines)
- original: 920.3 bytes (25.2 lines)
- signature: 70.8 bytes (1.7 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
53 86.5 ( 43.4/ 33.9/ 22.1) Tom Phoenix <rootbeer@teleport.com>
29 55.1 ( 16.6/ 38.5/ 24.9) Tad McClellan <tadmc@flash.net>
21 38.3 ( 10.9/ 20.8/ 14.2) Mike Stok <mike@stok.co.uk>
18 25.6 ( 9.4/ 16.2/ 8.3) Tung-chiang Yang <tcyang@netcom.com>
18 21.2 ( 10.9/ 10.3/ 7.6) Nathan V. Patwardhan <nvp@shore.net>
17 22.5 ( 11.3/ 11.2/ 7.6) Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
11 13.9 ( 6.2/ 7.6/ 5.6) M.J.T. Guy <mjtg@cus.cam.ac.uk>
11 15.5 ( 6.1/ 8.5/ 5.5) Even Holen <evenh@ra.pvv.ntnu.no>
9 15.6 ( 6.5/ 9.1/ 3.3) Simon Fairey <sfairey@adc.metrica.co.uk>
8 6.8 ( 4.9/ 1.9/ 1.9) FANNGMAIL@prodigy.net
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
218.9 ( 0.7/218.2/217.9) 1 Jonas Thvrnvall <labah@algonet.se>
86.5 ( 43.4/ 33.9/ 22.1) 53 Tom Phoenix <rootbeer@teleport.com>
55.1 ( 16.6/ 38.5/ 24.9) 29 Tad McClellan <tadmc@flash.net>
38.3 ( 10.9/ 20.8/ 14.2) 21 Mike Stok <mike@stok.co.uk>
25.6 ( 9.4/ 16.2/ 8.3) 18 Tung-chiang Yang <tcyang@netcom.com>
22.5 ( 11.3/ 11.2/ 7.6) 17 Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
21.2 ( 10.9/ 10.3/ 7.6) 18 Nathan V. Patwardhan <nvp@shore.net>
15.6 ( 6.5/ 9.1/ 3.3) 9 Simon Fairey <sfairey@adc.metrica.co.uk>
15.5 ( 6.1/ 8.5/ 5.5) 11 Even Holen <evenh@ra.pvv.ntnu.no>
14.9 ( 5.3/ 9.7/ 4.7) 8 Doug Seay <seay@absyss.fr>
Top 10 Posters by OCR (minimum of three posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
------ -------------- ----- -------
1.0000 2.7 / 2.7 4 chris@ixlabs.com
1.0000 2.3 / 2.3 3 bernie@rev.net
0.9998 4.1 / 4.1 4 "mashfiel" <ashfield.matthew@miti.nb.ca>
0.9995 1.9 / 1.9 8 FANNGMAIL@prodigy.net
0.9982 3.3 / 3.3 3 hcondon@ix.netcom.com
0.9762 2.3 / 2.4 4 "Sylvain St.Germain" <sgermain@nortel.ca>
0.9521 3.1 / 3.3 5 David Zeng <dizzy@soda.CSUA.Berkeley.EDU>
0.9427 0.5 / 0.5 3 Joelle D'Antin & Nicolas Gregoire <dantin@icp.grenet.fr>
0.9406 1.5 / 1.6 3 Danny Aldham <danny@lennon.postino.com>
0.8991 4.3 / 4.8 3 Matthew D. Healy <Matthew.Healy@yale.edu>
Bottom 10 Posters by OCR (minimum of three posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
------ -------------- ----- -------
0.4949 1.0 / 2.1 4 melody@imp.net
0.4849 0.4 / 0.7 3 Scott McMahan <scott@lighthouse.softbase.com>
0.4829 4.7 / 9.7 8 Doug Seay <seay@absyss.fr>
0.4312 1.4 / 3.3 3 fty_no_spam@utk.edu
0.4168 1.2 / 2.9 4 Uma Shanker <uma@heidelbg.ibm.com>
0.3721 0.9 / 2.4 3 Gisle Aas <aas@bergen.sn.no>
0.3582 3.3 / 9.1 9 Simon Fairey <sfairey@adc.metrica.co.uk>
0.3454 2.8 / 8.0 7 Charles DeRykus <ced@bcstec.ca.boeing.com>
0.3448 0.8 / 2.3 3 Jay Rogers <jay@rgrs.com>
0.3031 0.7 / 2.2 3 "John Bokma" <jbokma@caiw.nl>
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
14 Perl is 20 times slower on Cray J90 than SGI!
10 reverse chop?
10 Best idiom for defaulting, getting & untainting an env variable.
9 How do you do a 'cut -cx-y' with Perl?
8 Foreach with lists of arrays
8 Can an array have two subscripts (i.e., @array (i,j))?
7 Newbie needs help with searching an array
7 500 Server Error - Perl & Win 95 PWS
7 IF Problem
7 'use strict' with CGI.pm
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
218.9 ( 0.7/218.2/217.9) 1 Content type!
26.2 ( 10.0/ 15.0/ 12.0) 14 Perl is 20 times slower on Cray J90 than SGI!
14.8 ( 6.5/ 7.0/ 4.8) 10 Best idiom for defaulting, getting & untainting an env variable.
14.8 ( 5.8/ 8.9/ 5.7) 9 How do you do a 'cut -cx-y' with Perl?
14.4 ( 3.7/ 10.7/ 6.4) 5 pattern matching problem
13.6 ( 3.4/ 10.2/ 7.7) 5 How to substract a uniq integer from a ASCI string
13.5 ( 0.7/ 0.6/ 0.6) 1 Accessing Unix Modem ports via perl. (Yes I checked DejaNews)
13.5 ( 5.1/ 7.6/ 4.7) 7 500 Server Error - Perl & Win 95 PWS
13.2 ( 5.1/ 7.8/ 4.5) 8 Foreach with lists of arrays
12.4 ( 6.1/ 6.0/ 3.7) 6 Dear Spammer! We are NOT happy with you.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
18 comp.lang.perl.modules
14 comp.lang.perl
7 comp.os.misc
7 comp.misc
7 comp.mail.misc
7 comp.os.ms-windows.nt.admin.misc
7 comp.lang.misc
7 comp.os.ms-windows.nt.misc
7 comp.lang.basic.misc
7 comp.os.ms
Top 10 Crossposters
===================
Articles Address
-------- -------
12 Walter Tice USG <tice@hunch.zk3.dec.com>
8 Bill D <billd@magpage.com>
8 Wayne and Heather Borean <whborean@sympatico.ca>
8 Richard Greene <rgreene@bellatlantic.net>
8 David Director <ddirecto@sungardams.com>
8 Trey Valenta <trey@zipcon.net>
8 Andrew Gierth <andrew@erlenstar.demon.co.uk>
8 dc@rabi.phys.columbia.edu
5 "jim zhu" <ji1@home.com>
5 Daniel Glassman <dglass@swpartners.com>
------------------------------
Date: Thu, 17 Jul 1997 01:02:17 GMT
From: tcyang@netcom.com (Tung-chiang Yang)
Subject: Re: substition question
Message-Id: <tcyangEDFuvt.6tv@netcom.com>
What you want is assigned to $1 in the pattern /(OPH.*)$/ in a pattern.
(but after s/OPH.*//, all the text from "OPH" to end of line is already
gone)
==============================================
Brian Watson wrote after zapping the scum of the universe:
: Is there a way to assign what gets matched during a substitution to a
: variable?
: Example:
: s/OPH.*//;
: I would like the match from OPH to end of the line to get assigned to a
: variable.
--
====== Try the low-crossposting robomoderated 'alt.culture.taiwan' ======
soc.culture.taiwan, soc.culture.china (by SCC FAQ Team) FAQ's:
http://www.iglou.com/tcyang/Taiwan_faq.shtml, China_faq.shtml
------------------------------
Date: Thu, 17 Jul 1997 10:37:47 -0500
From: perrella andrew c <perrella@ehsn28.cen.uiuc.edu>
Subject: Using varaibles from a template file
Message-Id: <Pine.SOL.3.95.970717102941.17748D-100000@ehsn28.cen.uiuc.edu>
Hello,
I am have written a script that takes input from a template file
(.txt) and returns the value of that template file into a string.
Namely
$template = all the stuff that is in the file.
This lets me easily append etc. the file contents and then out put
$template to the screen.
I am having a problem however using variables in the template file.
for example.
lets say I have two variables in my script
$fname = "andrew";
$lname = "perrella";
Now I want to use a template file called template.txt that whose contents
are:
Hello,
My name is $fname $lname
Thus, when the script runs, it reads the template file, and outputs to the
screen
hello,
My name is Andrew Perrella
Where the script obviously has replaced $fname and $lname with the
declared values.
However is I have in the code
print "$template";
I get
hello,
my name is $fname $lname
which is literally the contents of the template file.
This is an exremely longwinded question, but I tried hard to make it as
specific as possible.
I would appreciate any help I could get.
andrew perrella
perrella@uiuc.edu
------------------------------
Date: Thu, 17 Jul 1997 09:49:19 -0400
From: squeak! <lyonsj@bgnet.bgsu.edu>
Subject: Re: What is--->> 19.483u 0.216s 0:12.71 154.9% 0+0k 0+0io 0pf+0w
Message-Id: <Pine.SGI.3.95.970717094648.22687B-100000@sigma.bgsu.edu>
On Thu, 17 Jul 1997, Shaun O'Shea wrote:
> Sometimes when I run perl scripts , the output gets spewed out and then
> stalls and finally spits out something similar to:
>
> 19.483u 0.216s 0:12.71 154.9% 0+0k 0+0io 0pf+0w
>
> Usually this occurs when the perl script contains nested loops.
I have no idea *why* it does this, but that's the time that's passed since
00:00:00 Jan 1, 1970.
I think.
It's just in some weird format.
Jen :9
'Incense, peppermints, a big can of Spam....'
--Space Ghost
'The impossible often has a kind of integrity to it which the merely
improbable lacks.'
--Douglas Adams
------------------------------
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 741
*************************************