[6810] in Perl-Users-Digest
Perl-Users Digest, Issue: 434 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 5 16:27:08 1997
Date: Mon, 5 May 97 13:00:40 -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 Mon, 5 May 1997 Volume: 8 Number: 434
Today's topics:
(Newbie alert!) How to have Perl PUSH browser to a web <andrewsr@bellatlantic.net>
Re: [DRAFT] RFD: comp.lang.perl reorg (Steffen Beyer)
Re: [DRAFT] RFD: comp.lang.perl.{data-structure,inter-p <gtk@walsh2.med.harvard.edu>
[Q] Activeware/Hip italian/european mirror sought (Roberto Lupi)
Re: [Q] Activeware/Hip italian/european mirror sought <edv@cegelec-aeg.co.at>
[Q] Hip/activeware and CPAN italian/european mirrors? (Roberto Lupi)
absolute novice - help me start <chris.lee@globasatcom.com>
Re: Ask a stupid question! thanks. <robert@ctllc.com>
Re: Ask a stupid question! thanks. (Tad McClellan)
Re: Ask a stupid question! thanks. (Steffen Beyer)
Re: Can I kill a pipe? (Joe McMahon)
Re: Comparing multi-line variables (Chip Salzenberg)
Complex Data Structure help: How can I do a push?? (Ratty)
composing a key out of 2 fields (Shawn)
Filtering (Raul Almquist)
GIF in Base64 encoding? <otisg@panther.middlebury.edu>
Re: Hexadecimal search and replace? ("John Dallman")
Installing DBI with Perl5.003 <tziem@netaxis.com>
Re: Loosing clpm regulars (was Re: Perl auto-replier) <flavell@mail.cern.ch>
Re: Loosing clpm regulars (was Re: Perl auto-replier) (Steffen Beyer)
Re: Loosing clpm regulars (was Re: Perl auto-replier) (Michael J Gebis)
Re: Loosing clpm regulars (was Re: Perl auto-replier) <mkruse@shamu.netexpress.net>
Re: Loosing clpm regulars (was Re: Perl auto-replier) (Andrew M. Langmead)
LWP::Socket dirk@icon.co.za
Re: Milli-second timer (Matthew D. Healy)
Re: Multi line matching problem. Should be simple?!? (Chipmunk)
Re: NT port of Perl 5 <dsmeltz@badg.com>
Re: output format (Tad McClellan)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 May 1997 18:17:41 GMT
From: "Rich Andrews" <andrewsr@bellatlantic.net>
Subject: (Newbie alert!) How to have Perl PUSH browser to a web site
Message-Id: <01bc597f$9d04fe00$0d79c697@andrewsr.nut.roche.com>
I've noticed several web sites that invoke a program with the end result
being
that by browser is at a new location (w/o weird codes as the URL).
For example, how could I write a simple perl script that pushes the browser
to www.yahoo.com?
(W/o using browser tricks, etc.)
THANKS IN ADVANCE!
-Rich
------------------------------
Date: 4 May 1997 18:19:52 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: [DRAFT] RFD: comp.lang.perl reorg
Message-Id: <5kik08$hmt$1@en1.engelschall.com>
A. Deckers <I-hate-cyber-promo@man.ac.uk> wrote:
I wrote:
> >Even if so, you can't exclude them from voting against (just like T-C
> >Yang said), so better don't call them names, don't despise them and don't
> >underestimate their possible importance.
> No, I can't exclude them from voting, and I fully expect some of them
> to vote against the proposal because of the moderation criteria.
> Happens to every single moderated group that goes to a CFV.
Yeah, alas, but that's life, isn't it? :-)
> As for not calling them names, you're right, I shouldn't, though I'm
> not going to change my opinions. :-)
Of course nobody is asking you to do that (to change your opinions)!
> >(It's rather difficult to apply real censorship with a robo-moderator
> >script because you can always find ways to circumvent it!)
> You can trivially circumvent _any_ moderation model; there is no
> difference between robo-moderation and hand-moderation in this sense.
Really?
Can you tell me a way to TRIVIALLY circumvent the moderator of
comp.infosystems.www.announce?
She's really tough, and she changes the text of my postings every time
(to make things worse, without any apparent reasons!)...
> >> : I'm sure some will crawl out of the woodwork when the official RFD is
> >> : published, but I doubt there is anything we can say to change their
> >> : point of view, they will probably be very few and I have better things
> >> : to do than to waste my time in puerile shouting matches.
> >
> >See above: don't talk about people fearing censorship in this contemptful
> >way.
> Ok, ok, I withdraw the "raving lunatic" charge, but I still don't
> intend to get into debates about the _principle_ of moderation, though
Nobody is asking you that, we all agree on the fact that c.l.p.misc has
become unbearable the way it is and that moderation is probably our best
option.
> I'm more than willing to ammend any of the details of _implementation_
> in so far as they affect this proposal.
I guess we (the people who have posted in this group of threads) all agree
completely with you in this aspect!
> I've seen far too many philosophical debates about moderation in
> news.groups, and they rarely get anywhere, largely because either side
> just talks right past the other one. I'm not going to get involved in
> that sort of debate. It'd be pointless to do so.
I agree absolutely with that!
> Cheers,
> Alain
Yours,
--
Steffen Beyer <sb@sdm.de> http://www.engelschall.com/u/sb/
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
>> Unsolicited commercial email goes directly to /dev/null <<
------------------------------
Date: 04 May 1997 12:22:27 -0400
From: Gregory Tucker-Kellogg <gtk@walsh2.med.harvard.edu>
Subject: Re: [DRAFT] RFD: comp.lang.perl.{data-structure,inter-process,programmer,regex}
Message-Id: <w2zpub437g.fsf@walsh2.med.harvard.edu>
sb@en.muc.de (Steffen Beyer) writes:
>
> Mark Mills <mark@ntr.net> wrote:
> Sometimes when you have a question you don't really know where the
> problem lies, so you are giving incentive to postings to multiple
> groups at the same time if you split up the groups in too narrow
> categories.
>
> Let's start with only *one* moderated group as a beginning. We will
> see then if the need exists for more groups.
>
> That's the usual USENET way, BTW.
I think Steffen makes a good point, for both reasons. As I understand
it, robo-moderation is designed to keep out irresponsible posts, but
some posters can be both within the guidelines of moderation and
ignorant of the proper group. Like Steffen, I would prefer to see a
single moderated group, either c.l.p.moderated or (moderated)
c.l.p.programmer.
I also think this would be easier for the (human) moderators.
>
> > Keep up da good work. :>
>
> Seconded!!
Likewise!
--
Gregory Tucker-Kellogg
Department of Biological Chemistry and Molecular Pharmacology
Harvard Medical School, Boston MA 02115
"Mojo Dobro" Finger for PGP info
------------------------------
Date: Mon, 05 May 1997 13:13:29 GMT
From: lupex@ascu.unian.it (Roberto Lupi)
Subject: [Q] Activeware/Hip italian/european mirror sought
Message-Id: <336a1a41.885646@news.cineca.it>
I am looking for an italian/european mirror of the Activeware
(formerly Hip) site (i.e. I am looking for Perl for Win32).
Do you have any URLs?
Thank anyway for wasting your time reading my message :)
---
Roberto Lupi
lupex@ascu.unian.it
------------------------------
Date: 5 May 1997 13:55:34 GMT
From: "Cegelec AEG" <edv@cegelec-aeg.co.at>
Subject: Re: [Q] Activeware/Hip italian/european mirror sought
Message-Id: <01bc595c$2e12d260$1b0a15ac@wiendata>
if you go to http://www.perl.com/CPAN/ it should set you automaticly to an
italian mirror of the perl archive. When I do it from austria I get pointed
to ftp://ftp.tuwien.ac.at/pub/languages/perl/CPAN//
http://www.perl.com/CPAN (without the trailing "/") presents you a list. It
tells me that there is a mirror at cis.utovrm.it
Arnold
Roberto Lupi <lupex@ascu.unian.it> wrote in article
<336a1a41.885646@news.cineca.it>...
> I am looking for an italian/european mirror of the Activeware
> (formerly Hip) site (i.e. I am looking for Perl for Win32).
>
> Do you have any URLs?
>
> Thank anyway for wasting your time reading my message :)
> ---
> Roberto Lupi
> lupex@ascu.unian.it
>
------------------------------
Date: Mon, 05 May 1997 13:13:28 GMT
From: lupex@ascu.unian.it (Roberto Lupi)
Subject: [Q] Hip/activeware and CPAN italian/european mirrors?
Message-Id: <336a1962.662960@news.cineca.it>
I'am looking for a italian or european mirror of the Activeware
(formerly Hip) site and of the CPAN.
Do you have any URLs?
Thanks for wasting your time reading my message.
---
Roberto Lupi
lupex@ascu.unian.it
------------------------------
Date: 5 May 1997 19:08:27 GMT
From: "chris" <chris.lee@globasatcom.com>
Subject: absolute novice - help me start
Message-Id: <01bc5987$a7cb3220$5589accf@chris>
ok, at the high risk of sounding (being) stupid i have a very elementary
question.
i want to learn perl and bought the sams "teach y-self perl in 21 days" and
it came w/ perl5 and all that crap. i am language illiterate (except back
in college took tp but forgot it all) and have win 95 and visualc++
software. i installed it , but i do not know how to write/save/run the
crapola. i typed the first example program and tried to run it the way the
book says in the perl.exe but nothing happens. what the hell do i need to
do?
some very patient soul, please help me get started so i can have the power
too.
chris the idiot.
------------------------------
Date: 4 May 1997 15:11:52 GMT
From: "Robert Pate" <robert@ctllc.com>
Subject: Re: Ask a stupid question! thanks.
Message-Id: <01bc589d$72e74480$306802cf@HOSTID.ctllc.com>
Well, you could always do what I did and pickup "Web Commander" server
software. It will run on win95 sys and fully supports perl5. I use this
to test my scripts before I FTP them up to my site.
Hope this helps!
%,5\.&'=*x <a9438@mail.kscgeb.edu.tw> wrote in article
<336d41c5.7806797@news.ks.silkera.net>...
> As the title,this is a simple question :
>
> If I didn't have server. Is it possible to run perl on my PC.
> I only have Win95 and perl for Win32 in my PC.
>
> Someone said I need Website,is it true?
>
> What software I need to install ,if I want to run perl?
>
> Thanks for telling me the answer.
>
>
>
------------------------------
Date: Sun, 4 May 1997 07:55:40 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Ask a stupid question! thanks.
Message-Id: <c01ik5.kp.ln@localhost>
%,5\.&'=*x (a9438@mail.kscgeb.edu.tw) wrote:
: As the title,this is a simple question :
: If I didn't have server. Is it possible to run perl on my PC.
Yes. Perl has no required "server".
Perl was in widespread use before the WWW was even invented!
Perl != CGI
: I only have Win95 and perl for Win32 in my PC.
That will do it as far as perl is concerned.
: Someone said I need Website,is it true?
If you want to use CGI scripts, then you might. But that wasn't
your question. Your question was what was needed to run perl,
not what was needed to run CGI scripts. As Perl and CGI are not
the same thing, the answer is different for Perl than for CGI.
Good thing too, cause that second question would be off topic here,
as this in not the CGI group. That group would be:
comp.infosystems.www.authoring.cgi
: What software I need to install ,if I want to run perl?
Just perl.
: Thanks for telling me the answer.
I expect you really meant to ask that "other" question.
If so, have a look at the Perl FAQ, part 3:
=head2 Where can I learn about CGI or Web programming in Perl?
Also look into the CGI.pm perl module, which allows you to do much
testing of CGI scripts, written in perl, without needing a web server.
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 4 May 1997 18:22:19 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: Ask a stupid question! thanks.
Message-Id: <5kik4r$hmt$2@en1.engelschall.com>
%,5\.&'=*x <a9438@mail.kscgeb.edu.tw> wrote:
> As the title,this is a simple question :
> If I didn't have server. Is it possible to run perl on my PC.
> I only have Win95 and perl for Win32 in my PC.
> Someone said I need Website,is it true?
> What software I need to install ,if I want to run perl?
> Thanks for telling me the answer.
42.
Yours,
--
Steffen Beyer <sb@sdm.de> http://www.engelschall.com/u/sb/
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
>> Unsolicited commercial email goes directly to /dev/null <<
------------------------------
Date: 05 May 1997 14:43:01 -0400
From: mcmahon@farside.gsfc.nasa.gov (Joe McMahon)
Subject: Re: Can I kill a pipe?
Message-Id: <vyjafm9ahfu.fsf@farside.i-did-not-set--mail-host-address--so-shoot-me>
A simpler method would be to steal Eryq's trick which he uses to build
Web pages: open a temp file, and write the mail into that. If you get a
happy result, open the pipe THEN and copy the contents of the file into
it. Otherwise, just unlink the file. This has the advantage that you're
not tied to forking sendmail, which will not work if you move the code to
a non-Unix system.
--- Joe M.
------------------------------
Date: 5 May 1997 17:45:50 GMT
From: chip@rio.atlantic.net (Chip Salzenberg)
Subject: Re: Comparing multi-line variables
Message-Id: <5kl6ce$mop@news.atlantic.net>
According to zbrown@lynx.dac.neu.edu (Zachary Brown):
>Given two variables $a and $b containing multiple lines of ascii text, how
>could perl locate all the start and end indices of the words or groups of
>words that are different in one from the other and vice versa?
That's a complex task, and you'd have to be a bit more precise to get
an answer. If I were doing it, I'd write two temporary files with one
word per line, then open(FOO, "diff $T1 $T2 |") and parse <FOO>.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
"Men of lofty genius are most active
when they are doing the least work."
-- Leonardo da Vinci
------------------------------
Date: Mon, 5 May 1997 11:49:31
From: ratty@uclink2.berkeley.edu (Ratty)
Subject: Complex Data Structure help: How can I do a push??
Message-Id: <ratty.36.000BD39C@uclink2.berkeley.edu>
I've used data structures a lot but never really got
comfortable with them and have had to futz around and tweak
to get them to work, never really understanding what I was
doing. The program I'm writing now uses a fairly complex
data structure and I've gotten it to work using array subscripts
but I'd prefer to implement it using push instead. It bugs me
that I can't figure out how to do this.
The program reads an sgml file, extracts attribute information
from selected tags, and uses this to print rows of small
thumbnail gifs to a web page. The data structure I've chosen
is an array of hashes of arrays of hashes:
@thumbrows contains hashes called %row. Each %row contains (among
other things) an array called @thumbs. @thumbs is an array
containing a hashes called %img. What follows is first the test
code that builds the struct, followed by a short loop to print
out selected values. Can anyone tell me how to eliminate the
subscripts and do all of this with push and foreach?
Finally at the very end of this post is a bit of the sgml text
Thanks for any help you can give.
Alvin Pollock
ratty@uclink2.berkeley.edu
#!/usr/bin/perl
$ThumbRowNum = 5;
$textdivs = "cover|div0|div1|div2|image";
undef $/;
$SgmlText = <>;
$i = 0;
$j = 0;
while ($SgmlText =~ /<($textdivs)([^>]*)>/gi) {
$tag = $1;
$atts = $2;
$tail = $';
if ($tag =~ /image/i) {
my $img = {};
$atts =~ /seqno\s*=\s*"?(\d+)/i
&& ($img->{seqno} = $1);
$atts =~ /nativeno\s*=\s*"?([-_A-Za-z0-9.]*)/i
&& ($img->{nativeno} = $1);
$atts =~ /entityref\s*=\s*"?([-_A-Za-z0-9.]*)/i
&& ($img->{entityref} = $1);
$tail =~ /^\s*<caption[^>]*>([\w\W]*?)<\/caption>/i
&& ($img->{caption} = $1);
$thumbrows[$i]->{thumbs}[$j] = $img;
if ($j < $ThumbRowNum) {
$j++;
} else {
$j = 0;
$i++;
}
}
}
$i = 0;
$j = 0;
for $i (0..$#thumbrows) {
for $j (0..$ThumbRowNum) {
print "$thumbrows[$i]->{thumbs}[$j]->{caption}\.\n";
}
}
SAMPLE SGML TEXT:
<page><image entityref="I0018236" seqno="2">
<caption>Friday Nov. 20th 1846</caption></page>
<page><image entityref="I0018237" seqno="3">
<caption>Sat. 21st-Monday 23rd</caption></page>
<page><image entityref="I0018238" seqno="4">
<caption>Tuesday 24th-Sunday 29th</caption></page>
<page><image entityref="I0018239" seqno="5">
<caption>Monday 30th-Wedns. 2nd</caption></page>
<page><image entityref="I0018240" seqno="6">
<caption>Thursd. 3rd-Sund. 6th</caption></page>
<page><image entityref="I0018241" seqno="7">
<caption>Mond. 7th-Wedns. 9th</caption></page>
<page>
------------------------------
Date: Mon, 05 May 1997 18:54:08 GMT
From: srf@ultranet.ca (Shawn)
Subject: composing a key out of 2 fields
Message-Id: <336e284e.8928177@news.ultranet.ca>
I plan to have a comma delimeted file for recording hours worked week
by week with the following format
project number, start date, end date, Sun hrs, Mon hrs, .. sat hrs,
total hrs
Each contractor has their own file. Since someone may be working on
several projects at once, I need both the project number and the start
date to identify unique records.
I would like to set the file up as a hash of arrays with the key being
a composite of the project number and the start date.
Is there any way to do a sort on composite keys, say if the keys were
something like 541_5/5/1997
What's the best format for the date?
TIA
------------------------------
Date: Sun, 04 May 1997 19:33:40 -0600
From: strider@ShadowMAC.org (Raul Almquist)
Subject: Filtering
Message-Id: <strider-ya02408000R0405971933400001@news.winternet.com>
I am working with filename filtering... I have everything filtered except
one stinking character, or so I think :_)
The current filter is as follows...
$file =~ tr/A-Z/a-z/; # Upper to lowercase
$file =~ s/(?:%20)+/_/g; # One or more spaces to "_"
$file =~ s/%2525/_/g; # Convert all "%" in original filename
$file =~ s/%252f/_/g; # Convert all "/"
$file =~ s/%[\da-fA-F]{2}/_/g; # Remove all %xx
$file =~ tr/a-zA-Z0-9_.-/_/cs; # Convert others except "\" and "/"
$file =~ tr/././s; # One or more periods to "."
$file =~ tr/_/_/s; # Serialized _ to single "_"
$file =~ tr/-/-/s; # Serialized - to single "-"
$file =~ s/_\././g; # Remove _ either side of "."
$file =~ s/-\././g; # Remove - either side of "."
Now the character that I can not seem to filter out of possible filenames
is the "\" character... I have tried several different configs for the
filtering of the "\" character out of any filenames, but nothing appears to
work, and I do not see a method to set s/ or tr/ to use a hex code to
determine the character to be filtered.
Basically what this is for is file uploading from one platform to
another, it is needed to insure that filenames which are legit under one OS
do not cause problems with the other OS the files are being uploaded to.
Suggestions? Email please.
------------------------------
Date: Sun, 4 May 1997 15:42:20 -0400
From: "Otis Gospodnetic" <otisg@panther.middlebury.edu>
Subject: GIF in Base64 encoding?
Message-Id: <5kioqk$1oak$1@tiger.middlebury.edu>
Hi,
I was wondering if anyone knows how I can Base64 encode a GIF?
I have no clue about image formats, so I don't even fully understand what
I'm saying here (don't laugh :)), but I know that I have to use Base64
encoding on a GIF file.
I looked at MIME::Base64, but the pod says that the module is for encoding
strings (as opposed to images). But, can I simply open() the GIF and use
this MIME::Base64 to encode the data I read after open()ing ?
Thanks :)
Otis
------------------------------
Date: Sun, 4 May 1997 19:22:20 GMT
From: jgd@cix.compulink.co.uk ("John Dallman")
Subject: Re: Hexadecimal search and replace?
Message-Id: <E9o8H9.LtE@cix.compulink.co.uk>
In article <5kb5qp$84l@news1.fast.net>, tim@regiononline.com (Timothy
Lindgren) wrote:
> The format for new line (Carrage Return) in HEX is " 0D0A ".
No it isn't, actually. The "new line" concept in C and Perl (\n) is
supposed to be whatever the newline character is on your operating system.
However, several bits of software (eg, the Window NT FTP client) will, if
used incorrectly, translate this wrongly.
UNIX systems that use ASCII characters use 0x0A, the ASCII "Line Feed"
character to store \n in files. \r sumbolises Carriage Return, 0x0D.
Microsoft operating systems use two characters, 0x0D 0x0A, or Carriage
Return and Line Feed. Your files were probably created when some program
thought it was translating UNIX-style files to MS-style files: it
translated the 0As to 0D0A, without noticing that there were already 0Ds
in the file.
> Can anyone help describe a routine that will open a file from command
> line, then search for the bad hex value ( "0D0D0A" ) and replace it
> with the HEX value of " 0D0A "?
This depends on the operating system you are running on. To make it
portable, it's more than a one-liner. This example is more laborious than
slick; looking up the keywords in the manpages will show you way to make
it better.
die "Usage: perl fixlines.pl infile outfile\n" unless( $#ARGV == 1);
open( INFILE, $ARGV[0]) || die "Can't open input file: $!\n";
open( OUTFILE, ">" . $ARGV[1]) || die "Can't open output file: $!\n";
binmode( INFILE);
binmode( OUTFILE);
while( $_ = <INFILE>)
{
s/\r//g;
s/\n//g;
print OUTFILE $_, "\r\n";
}
close( OUTFILE) || die "Can't close output file: $!\n";
close( INFILE) || die "Can't close input file: $!\n";
> Is there a command/function in SED that would find these and replace
> them with a standard new-line (" \n ")?
Probably. Why not ask in the newsgroup that deals with sed? This one's
about Perl.
John Dallman, jgd@cix.co.uk. A micro-FAQ on things I keep getting asked:
#!perl is at ftp://.../CPAN/ports/msdos/tips-tricks/hbp_403.zip, Perl for
NT/Win 95 can be found at http://www.activeware.com, with an excellent FAQ
file at http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html
and no, I don't have the slightest idea what's wrong with your CGI script.
Try http://www.perl.com/perl/faq/idiots-guide.html
------------------------------
Date: Sun, 04 May 1997 12:28:28 -0500
From: "Thomas A. Ziem" <tziem@netaxis.com>
Subject: Installing DBI with Perl5.003
Message-Id: <336CC73C.10E9@netaxis.com>
I am encountering the following problems while installing the DBI
package with Perl5.003 on SGI IRIX 6.3:
Can anybody help? Thanks.
Begin make:
cp DBIXS.h ./blib/arch/auto/DBI/DBIXS.h
cp DBI.pm ./blib/lib/DBI.pm
cp lib/dbi/W32ODBC.pm ./blib/lib/dbi/W32ODBC.pm
cp lib/dbd/NullP.pm ./blib/lib/dbd/NullP.pm
cp lib/dbd/Sponge.pm ./blib/lib/dbd/Sponge.pm
cp lib/dbd/ExampleP.pm ./blib/lib/dbd/ExampleP.pm
/usr/freeware/bin/perl -I/usr/freeware/lib/perl5/irix/5.003
-I/usr/freeware/lib/perl5 /usr/freeware/lib/perl5/ExtUtils/xsubpp
-typemap /usr/freeware/lib/perl5/ExtUtils/typemap DBI.xs >DBI.tc && mv
DBI.tc DBI.c
cc -c -DBSD_TYPES -D_BSD_SIGNALS -D_BSD_TIME -DLANGUAGE_C
-Olimit 3000 -O2 -DVERSION=\"0.79\" -DXS_VERSION=\"0.79\"
-I/usr/freeware/lib/perl5/irix/5.003/CORE DBI.c
cfe: Warning 568: ERROR MESSAGE 68
cfe: Warning 513: ./DBIXS.h, ERROR MESSAGE 3 305: ERROR MESSAGE 13
^
cfe: ERROR MESSAGE 8DBI.c, ERROR MESSAGE 3 38: ERROR MESSAGE 129
void setlinebuf (FILE *iop) ;
-----^
cfe: ERROR MESSAGE 8DBI.c, ERROR MESSAGE 3 38: ERROR MESSAGE 139
void setlinebuf (FILE *iop) ;
----------------^
*** Error code 1 (bu21)
--
<Thomas A. Ziem>
------------------------------
Date: Mon, 5 May 1997 16:51:44 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <Pine.A41.3.95a.970505184822.29670G-100000@sp067>
On 5 May 1997, Matt Kruse wrote:
> I wish people would just learn to use www.dejanews.com.
To do what? Review all the wrong answers that others have posted?
dejanews is a great resource for reviewing _whether_ a topic has
been discussed, and for getting the general flavour of the discussion,
but it needs a lot of experience to use it for getting a reliable
answer to a question.
> Much easier and faster than a FAQ,
For an experienced reader maybe; but when I'm adrift on a group
where I know little, and need to learn fast, give me an FAQ any day.
--
and why can't anyone spell "losing" any more?
------------------------------
Date: 4 May 1997 18:05:15 GMT
From: sb@en.muc.de (Steffen Beyer)
Subject: Re: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <5kij4r$gjv$1@en1.engelschall.com>
Randal Schwartz <merlyn@stonehenge.com> wrote:
> Steffen> Another guy in this thread (sorry, I didn't memorize your
> Steffen> name!) had a great idea too: Why not create a newsgroup
> Steffen> called "comp.lang.perl.wizards" to attract all the people who
> Steffen> go for glitter away from the newsgroups where the non-trivial
> Steffen> issues are discussed?
> Steffen> But I suppose Netiquette wouldn't allow such a big bluff...
>
> No, the problem is that such a title becomes a big "newbie magnet"...
That's exactly what it's supposed to be!
That's why I was talking about "glitter" and "bluff": Attract them AWAY
from c.l.p.misc so that the real wizards can communicate THERE in peace!
But this bluff is probably not tolerated by the people who administrate,
i.e., create a new newsgroup on USENET!
> Newbie says, "gee, my question is REALLY TOUGH [for me] and I want the
> most ACCURATE answer... I guess I should go ask a WIZARD!"
That's the INTENTION! :-)
> comp.unix.wizards was the first spectacular failure of this kind.
You can look at it as a success - I bet that one could talk in peace
about serious things in the "old" newsgroups!
> Eventually it got reformulated as a moderated group.
Oh well, I think that this is probably the best solution for us, too. :-)
> Automoderation (ala ciaw.cgi) seems to be the only way to go, unless
> we got a zillion volunteers. This is one of the projects that The
> Perl Institute is interested in managing and assisting with, but it
> has been falling below the TPI resource cutline for the last few
> months, sadly.
Yeah, too bad!
But I understand that perfectly... I'm myself in the computer business!
Yours sincerely,
--
Steffen Beyer <sb@sdm.de> http://www.engelschall.com/u/sb/
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
>> Unsolicited commercial email goes directly to /dev/null <<
------------------------------
Date: 5 May 1997 18:10:26 GMT
From: gebis@purcell.ecn.purdue.edu (Michael J Gebis)
Subject: Re: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <5kl7qi$qn9@mozo.cc.purdue.edu>
worrall@maxx.cs.bris.ac.uk.no-spam (Adam Worrall) writes:
}How about secretly moving to a new group, say
} alt.pets.camels
}and then saying something obtuse like
} "... of course, all _real_ Perl programmers are interested in
} Camels, and regularly read alt.pets.camels ..."
}in the resources section of the FAQ. Then people who actually read it
}will find their way there ...
Make a group called:
comp.lang.perl.faq-readers
Anybody who's not on "the list" gets their post cancelled (or better
yet, cancelled and re-posted on comp.lang.perl.misc). How does
one get on the list? Pass a quiz based upon the FAQ.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: 5 May 1997 01:37:53 GMT
From: Matt Kruse <mkruse@shamu.netexpress.net>
Subject: Re: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <5kjdlh$8eo@news1-alterdial.uu.net>
Randal Schwartz <merlyn@stonehenge.com> wrote:
: >>>>> "Steffen" == Steffen Beyer <sb@en.muc.de> writes:
: Steffen> called "comp.lang.perl.wizards" to attract all the people who
: Steffen> go for glitter away from the newsgroups where the non-trivial
: Steffen> issues are discussed?
: No, the problem is that such a title becomes a big "newbie magnet"...
: Newbie says, "gee, my question is REALLY TOUGH [for me] and I want the
: most ACCURATE answer... I guess I should go ask a WIZARD!"
You missed the humor, Randal. That's the point - attract the newbies,
and no one who knows anything will read .wizards. So the other groups
wouldnt get the newbie questions. I like it :)
I wish people would just learn to use www.dejanews.com.
Much easier and faster than a FAQ, and it works for any newsgroup and any
topic. See http://mkruse.netexpress.net/info/search/index.html :)
--
Matt Kruse
mkruse@netexpress.net
http://mkruse.netexpress.net/ http://www.mkstats.com/
---------------------------------------------------------------------------
------------------------------
Date: Mon, 5 May 1997 12:33:33 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <E9pK7x.DCK@world.std.com>
Gregory Tucker-Kellogg <gtk@walsh2.med.harvard.edu> writes:
>aml@world.std.com (Andrew M. Langmead) writes:
>> This groups hasn't had a regularly posted FAQ in years.
>That is certainly no longer true. Today, for example, the 9-part FAQ
>immediately followed your article on my server.
Oops, and editing mistake, what I meant to write was "up until a few
months ago, this group hasn't had a regularly posted FAQ in years."
And after a little research, I've discovered that the last time the
old FAQ was published was January 1996, and the new FAQ was published
March of 1997. Ok, so that means that I've only had a little over a
year of "no FAQ", but the amount of time the FAQ spent in disrepair
before 1/96 was significant.
Yes, the new FAQ is thorough, up to date, and posted regularly. But
when the CGI boon hit, and novice perl programmers were flooding in,
the FAQ had little to do with the current perl version. The part that
said "the current version of perl is 4.036 was changed to 5.001" (the
FAQ was not updated for 5.002 or 5.003) A section was added to
describe the difference between perl 4 and perl 5 (I believe taken
from the perl man page.) and some perl 4 specific information was
removed. (For example, a section describing how to create
multidimensional data structures using typeglobs was removed, but no
example of how to create multidimensional data stucures using
references was added.)
>> And before that, the person who the FAQ maintainer had instructed to
>> post the FAQ on his behalf wasn't posting with "Expires" headers to
>> keep the article around. It was also out of date and had little perl
>> 5 information.
>I don't know about the first issue, but the second is also no longer
>true. The new Perl FAQ has lots of perl 5 information, and the FAQ
>posted on 4 May 1997 had changes as recently as 24 April 1997.
The problem is that the bad habits we have encouraged have been
developing for years. We can't expect to fix them in two months.
--
Andrew Langmead
------------------------------
Date: Sun, 04 May 1997 23:35:41 GMT
From: dirk@icon.co.za
Subject: LWP::Socket
Message-Id: <336d1c1e.12007269@news.icon.co.za>
I'm trying to run LWP on Win95, the lwp-request.pl (test program) that
comes with the configuration works fine.
But my own program returns this error:
Bad symbol for filehandle at c:/perl/lib/lwp/socket.pm line 115
Here is me test script.
#!/usr/local/bin/perl
push(@INC,"/perl/lib");
use LWP::Socket;
$socket = LWP::Socket;
$host = "www\.test\.my\.host"; <-- took out the host I was trying to
connect to
$port = "80";
print "hello $host $port\n";
$socket->connect($host,$port);
$socket->read(\$buffer);
print $buffer;
$socket=undef;
Anyone know what's wrong or how to fix ?
Thanks
Dirk Rheeder
dirk@icon.co.za
------------------------------
Date: Mon, 05 May 1997 13:48:25 -0500
From: Matthew.Healy@yale.edu (Matthew D. Healy)
Subject: Re: Milli-second timer
Message-Id: <Matthew.Healy-0505971348250001@pudding.med.yale.edu>
In article <33664004.79FF@glenayre.com>, Pam Jones <pjones@glenayre.com> wrote:
> I am writing a load-testing program and need to time my calls in
> milli-seconds (or at least something smaller then seconds). I am using
> 5.003 on a Sun Sparc 5, Solaris 2.5
>
Even if you _had_ a millisecond timer, it would be of extremely limited
value for the kind of task you are trying to do, because you are running
a multiuser system with inherent timing variations. Even if you _could_
get the time in milliseconds for _this_ call to sprintf or whatever, that
tells you very little about the real performance impact of such calls.
The right way to handle this kind of problem is to do it the way that
benchmark.pm does: run the program a whole bunch of times, with and
without the specific call whose speed you are trying to test, and
compare average runtimes.
Or you can write a simple little benchmark routine yourself, it's really
pretty simple: just run a tight loop twice, once with the syscall in
question and once without it. Something like the following UNTESTED
code:
$Start_Time1 = time;
$LoopCount = 1000; #adjust count as appropriate
for ($i = 0; $i <$LoopCount ; $i++)
{
# code to set-up for the syscall
#
$foo = the_system_call($whatever);
}
$End_Time_1 = time - $Start_Time;
# Loop Below identical to loop above EXCEPT THAT syscall is commented-out
$Start_Time2 = time;
for ($i = 0; $i <$LoopCount ; $i++) #adjust count as appropriate
{
# code to set-up for the syscall
#
# $foo = the_system_call($whatever);
}
$End_Time_2 = time - $Start_Time;
$Duration_1 = ($End_Time_1 - $Start_Time1) / $LoopCount ;
$Duration_2 = ($End_Time_2 - $Start_Time2) / $LoopCount;
$DeltaDuration = $Duration_1 - $Duration_2 ;
print "With Syscall, avg time = $Duration_1\n";
print "Without call, avg time = $Duration_2\n";
print "Difference in time = $DeltaDuration\n";
---------
As of 02 May 1997, 973 days till Y2K....
Matthew.Healy@yale.edu
http://paella.med.yale.edu/~healy
"But I thought it was pointed at the rabbit *between* my feet!"
---------
Help a victim of severe email harrassment, see
http://www.geocities.com/~hitchcockc/story.html#fund
---------
------------------------------
Date: 5 May 1997 05:39:52 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Multi line matching problem. Should be simple?!?
Message-Id: <5kjrr8$bju$1@dartvax.dartmouth.edu>
In article <ofb911xjzyo.fsf@geronimo.uit.no>
Tom Grydeland <tom@geronimo.uit.no> writes:
> Ronald.J.Kimball@dartmouth.edu (Chipmunk) writes:
>
> > Or, you could do this:
> >
> > $var =~ tr/\n//d;
> > $var =~ s/something/blablabla/;
> >
> > if you don't mind losing all your newlines.
>
> And if you do, try
>
> ($tmp = $var) =~ tr/\n//d;
> $tmp =~ s/something/blablabla/;
Hmm. What exactly does that get you? Either you use the temp variable
later on, in which case you have lost all your newlines, or you use the
original variable, in which case you haven't made the substitution.
Chipmunk
------------------------------
Date: Thu, 01 May 1997 20:07:30 GMT
From: "Dan Smeltz" <dsmeltz@badg.com>
Subject: Re: NT port of Perl 5
Message-Id: <01bc5662$ee972d80$360ba8c0@ntdan.badg.com>
Go to www.activeware.com. All the Perl 5 for NT/95 is there.
Dan
------------------------------
Date: Sun, 4 May 1997 07:45:47 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: output format
Message-Id: <rd0ik5.8n.ln@localhost>
Max Kull (mkull@io.com) wrote:
: Question from a new user. I'm trying to print out baseball batting
: averages...... .305, .274, etc. I can't figure out in Perl how to
: suppress the leading zero (0.305, 0.274, etc.). Suggestions would be
: appreciated.
As the precision for batting averages is always to the thousandths
place (three decimal places), why not work with *integers* in the
0..999 range instead. This will also avoid the problems associated
with representing floating point numbers in binary format.
----------------------
#! /usr/bin/perl -w
# work with floating point numbers
$this = .305; # this year's average
$last = .303; # last year's average
$avg = ($this + $last) / 2; # average over the last two years
printf("%0.20f\n", $avg); # expecting .304
# work with integers (offset by one thousand)
$this = 305; # this year's average
$last = 303; # last year's average
$avg = ($this + $last) / 2; # average over the last two years
printf(".%3d\n", $avg);
----------------------
: Thanks,
You're welcome.
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
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 434
*************************************