[10338] in Perl-Users-Digest
Perl-Users Digest, Issue: 3931 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 8 18:07:29 1998
Date: Thu, 8 Oct 98 15:00:20 -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, 8 Oct 1998 Volume: 8 Number: 3931
Today's topics:
Re: *quick q:* how to escape a query string? (Larry Rosler)
Re: anyone got a rtf->html converter in perl? <jdporter@min.net>
Re: anyone got a rtf->html converter in perl? <eashton@bbnplanet.com>
Re: Are there any "perl.newbie" group or forum? <mp@mkt2mkt.com>
Re: Are there any "perl.newbie" group or forum? <mp@mkt2mkt.com>
Re: Are there any "perl.newbie" group or forum? <mp@mkt2mkt.com>
Re: Are there any "perl.newbie" group or forum? <eashton@bbnplanet.com>
Re: Are there any "perl.newbie" group or forum? <ludlow@us.ibm.com>
Re: Auto Reply via E-mail (John Moreno)
Re: Back button in Perl? (Marc Bissonnette)
CGI perl book nguyen.van@imvi.bls.com
Re: CGI.pm - forms within tables - How to? <mp@mkt2mkt.com>
Re: comp.lang.perl.win32?? <jdporter@min.net>
Compiling Perl 4 (Michael Congdon)
Re: database problem..need urgent help!!!!!!! jesten@wdynamic.com
Re: Difficulty with HTML & Perl & CGI <mp@mkt2mkt.com>
Getting the last date modified <lin@wdg.mot.com>
How to lauch search on another machine? <lily@tigr.org>
Re: Navigating in a tab seperatet text file <ff@otis.arraycomm.com>
Re: Navigating in a tab seperatet text file (Matt Knecht)
Re: Navigating in a tab seperatet text file <rootbeer@teleport.com>
Re: PERL, C++ Software Test Engineer-Chandler, AZ pramsey@iname.com
Re: print bug/feature? <ff@otis.arraycomm.com>
Re: print bug/feature? <aqumsieh@tigre.matrox.com>
Re: Q: Speed up a regular expression <sugalskd@netserve.ous.edu>
select <supra@ucentral.ml.org>
Re: What perl modules do I have??????? jesten@wdynamic.com
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 8 Oct 1998 14:50:08 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: *quick q:* how to escape a query string?
Message-Id: <MPG.1086d3692b4c5bc19897fc@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <cj9T1.806$fS.2065833@news.itd.umich.edu> on Thu, 08 Oct 1998
20:32:08 GMT, Sean McAfee <mcafee@waits.facilities.med.umich.edu> says...
...
> I downloaded RFC 1738 while composing my article (ironic that I should go
> to such trouble and then get the details wrong, eh?), and I could find no
> mention of '+' being an acceptable escape for ' '. Where is this
> convention documented
Wrong RFC. Note that the question refers to a 'query string', not a URL.
This is a grammar fragment from RFC 1945 (HTTP/1.0) or RFC 2068
(HTTP/1.1):
query = *( uchar | reserved )
uchar = unreserved | escape
unreserved = ALPHA | DIGIT | safe | extra | national
escape = "%" HEX HEX
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
safe = "$" | "-" | "_" | "."
unsafe = CTL | SP | <"> | "#" | "%" | "<" | ">"
national = <any OCTET excluding ALPHA, DIGIT,
reserved, extra, safe, and unsafe>
OCTET = <any 8-bit sequence of data>
UPALPHA = <any US-ASCII uppercase letter "A".."Z">
LOALPHA = <any US-ASCII lowercase letter "a".."z">
ALPHA = UPALPHA | LOALPHA
DIGIT = <any US-ASCII digit "0".."9">
HEX = "A" | "B" | "C" | "D" | "E" | "F" |
"a" | "b" | "c" | "d" | "e" | "f" | DIGIT
CTL = <any US-ASCII control character
(octets 0 - 31) and DEL (127)>
SP = <US-ASCII SP, space (32)>
<"> = <US-ASCII double-quote mark (34)>
You are right that '+' is not mentioned as an escape for ' '. But it is
widely used, so it might be wise to escape '+' also.
The 'unsafe' in this grammar fragment reminded me of another grievous
error in your regex that I overlooked: '%' *must* be escaped
(obviously)!
I conclude that the this grammar defines the following as the character
class to escape:
[\x00-\x20"#%<>\x7F]
Quite different from yours as corrected for ' ' ([^\x21-\x7E]); in
particular, it lets "\x80-\xFF" alone.
I also conclude that maybe the module is the way to go! :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 08 Oct 1998 17:05:44 -0400
From: John Porter <jdporter@min.net>
Subject: Re: anyone got a rtf->html converter in perl?
Message-Id: <361D2927.8CC75129@min.net>
Chris Denman wrote:
>
> anyone got a rtf->html converter in perl?
>
> If not I'll code one myselft (not looking forward to it, really!)
"Abandon all hope," as they say.
RTF is a hellaciously nasty format.
Just as "nothing can parse Perl like perl",
nothing can parse RTF like MS Word. Use it.
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: Thu, 08 Oct 1998 21:26:44 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: anyone got a rtf->html converter in perl?
Message-Id: <361D2B99.46E251AD@bbnplanet.com>
John Porter wrote:
> "Abandon all hope," as they say.
> RTF is a hellaciously nasty format.
It would be an interesting challenge, would it not? I never like to
think that MS is the only option and I never like being told I have no
choice.
e.
------------------------------
Date: Thu, 08 Oct 1998 14:06:51 -0800
From: madame philosophe <mp@mkt2mkt.com>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <361D3762.6096A311@mkt2mkt.com>
> I keep waiting for some knowledgeable person to post an answer;
> but some questions just seem to get lost in the noise.
>
> --
> John "Many Jars" Porter
> baby mother hospital scissors creature judgment butcher engineer
Yeah!!!!
MP
------------------------------
Date: Thu, 08 Oct 1998 14:09:16 -0800
From: madame philosophe <mp@mkt2mkt.com>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <361D37F2.14B76F76@mkt2mkt.com>
Yeah!!
Craig Berry wrote:
> madame philosophe (mp@mkt2mkt.com) wrote:
> : > "People are going to come and deposit bodily excretions in your
> : > sandbox. Get used to it." No, I'm sorry. There are trends which
> : > must be resisted, however futile it turns out to be.
> :
> : Oh, come ON!!! Are you telling me newbie questions are likened to
> : excrement? Shame on you.
>
> Folks, if we don't start using precise language to discuss this issue,
> we're sunk. Nobody (whose posts I've seen) is comparing *all* newbie
> questions to excrement. Quite a few of us are comparing *FAQs* (typically
> posted by newbies) to excrement, or spam, or other messy, annoying things.
>
> You can't rationally debate this topic until you make a clear division
> between the postings of ignorant but well-intentioned newbies who have
> made the best use they know how of all resources at their disposal, and
> the postings of those who ask FAQs because they can't be bothered to read
> any of the available doc before asking thousands of people to do their
> homework for them.
>
> ---------------------------------------------------------------------
> | Craig Berry - cberry@cinenet.net
> --*-- Home Page: http://www.cinenet.net/users/cberry/home.html
> | "Ripple in still water, when there is no pebble tossed,
> nor wind to blow..."
------------------------------
Date: Thu, 08 Oct 1998 14:11:19 -0800
From: madame philosophe <mp@mkt2mkt.com>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <361D386D.926BE43@mkt2mkt.com>
...and what pray tell is a troll?
Elaine -HappyFunBall- Ashton wrote:
> John Porter wrote:
>
> > What other conclusion could I draw? You have obviously not
> > read any of the many kilobytes this newsgroup has generated
> > in the past on this subject.
>
> The only conclusion I can draw is that this person simply must be a
> troll.
>
> > Not sure what else I can say except clpm isn't Paris.
>
> The law of the commons could apply here. Scoopers are handy things.
>
> e.
------------------------------
Date: Thu, 08 Oct 1998 21:22:57 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <361D2AB6.358AD04@bbnplanet.com>
madame philosophe wrote:
> ...and what pray tell is a troll?
A troll is someone whom we are not quite sure as to their authenticity
and whom we suspect is deliberately stirring the group. I was laughing
at one point. If you aren't a troll we'll make you an honorary one.
madame 'h. clpm troll' philosophe. :)
e.
------------------------------
Date: Thu, 08 Oct 1998 16:33:08 -0500
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <361D2F94.72891C99@us.ibm.com>
madame philosophe wrote:
>
> ...and what pray tell is a troll?
"troll" as in "trolling" for attention
It means that the purpose of the post is to incite a flamewar rather
than a rational discussion.
--
James Ludlow (ludlow@us.ibm.com)
Disclaimer: This isn't technical support, and all opinions are my own.
------------------------------
Date: Thu, 8 Oct 1998 17:02:55 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: Auto Reply via E-mail
Message-Id: <1dglb7u.t566nzea5t9fN@roxboro0-037.dyn.interpath.net>
Tony <aldisfu@i-2000.com> wrote:
> Hi,
>
> How could I do an auto-reply via e-mail.
>
> Why couldn't I use open(mail,"| telnet ppp.com 25");
> What should I do if I wanted to do that?
>
> Please help....thank you.
Congratulations! You get to pick among 2 (yes, that's right TWO)
different answers:
1) This isn't a perl question. Please ask a perl question.
2) You haven't formed your question clearly enough for a meaningful
answer (other than the above) to be given.
--
John Moreno
------------------------------
Date: 8 Oct 1998 20:59:57 GMT
From: dragnet@internalysis.com (Marc Bissonnette)
Subject: Re: Back button in Perl?
Message-Id: <6vj94d$g9p$1@news.interlog.com>
In article <Pine.GSO.4.02A.9810081106220.4710-100000@user2.teleport.com>,
rootbeer@teleport.com says...
>
>2. This has already been discussed to death. Please check the archives
>to avoid making the mistakes of the past.
Yes, I know (now). I realized the flaw in my logic in that it would, indeed,
create an endless loop (unless you used session tracking and stored the
path-of-viseted docs in a DB)
Apologies (again)
--
Marc Bissonnette
InternAlysis
Corporate Internet Research and Results!
http://www.internalysis.com
------------------------------
Date: Thu, 08 Oct 1998 21:42:29 GMT
From: nguyen.van@imvi.bls.com
Subject: CGI perl book
Message-Id: <6vjbk5$au$1@nnrp1.dejanews.com>
Hi guys,
I want to know which book is the excellent one for Perl CGI. I want to buy one
so that I can write CGI scripts.
Thanks
Van
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 08 Oct 1998 14:04:30 -0800
From: madame philosophe <mp@mkt2mkt.com>
To: John Edstrom <edstrom@hmsc.orst.edu>
Subject: Re: CGI.pm - forms within tables - How to?
Message-Id: <361D36D5.87E507A6@mkt2mkt.com>
I don't know if the below text is from there and I'm being redundant but if it is
of any help...check out Lincoln Stein's sample code at
http://www.wiley.com/compbooks/stein.
(You don't have to stay at the booksite: there are links to his personal
websites. I just can't ever remember the URL.)
best,
MP
ps I have his book and it's been so flipped-over-while-open and earmarked that it
finally has that comfy feeling!
John Edstrom wrote:
> In article <6ur3q8$2fm$3@marina.cinenet.net>,
> cberry@cinenet.net (Craig Berry) writes:
> > Steven D Jones (Steve_D_Jones@hp.com) wrote:
> >: I would like to create a form which is formated by placing the input fields
> >: inside of a table. Here's an html example:
> >:
> ...
> >
> > Note that since you want the radio buttons in separate cells, you can't
> > use CGI.pm's radio_group function; hence the literal HTML for these.
> >
>
> read the notes about radio- and checkbox groups:
>
> radio button group:
> 6. HTML3-compatible browsers (such as Netscape) can
> take advantage of the optional parameters -rows,
> and -columns. These parameters cause
> radio_group() to return an HTML3 compatible table
> containing the radio group formatted with the
> specified number of rows and columns. You can
> provide just the -columns parameter if you wish;
> radio_group will calculate the correct number of
> rows
>
> If you want to do something fancy with the table run the output of the
> $cgi->radio_group() call through a filter to borders, BGCOLOR & etc.
>
> je
------------------------------
Date: Thu, 08 Oct 1998 17:02:19 -0400
From: John Porter <jdporter@min.net>
Subject: Re: comp.lang.perl.win32??
Message-Id: <361D285B.923BF2A@min.net>
Craig Berry wrote:
>
> if we segregate the win32 users
> into a 'ghetto' of sorts, how are they expected to learn about the
> underlying Unix/tools philosophy?
You make it sound like subscribers to clp.win32 can't also subscribe
clp.m*. When they wanna talk about general things, they come over
here. When they wanna talk about Tk, they go there.
As it is, many of us frequent all the existing comp.lang.perl.*
groups.
> But should we be encouraging and reinforcing this difference?
> And wouldn't discussion of libwin32 belong in
> comp.lang.perl.modules(.win32), in any case?
The same argument could be made for Tk.
But it's specific enough, with a large enough user base, that
this isn't a problem.
--
John "Many Jars" Porter
baby mother hospital scissors creature judgment butcher engineer
------------------------------
Date: 08 Oct 1998 14:22:38 PDT
From: mscongdon@hotmail.com (Michael Congdon)
Subject: Compiling Perl 4
Message-Id: <361d2970.59647370@news.concentric.net>
I know this is a step back in time, but I am looking for a Perl 4
compiler. More specifically, I need to compile the collection of
Sybase-Perl commands for use on a NetWare Web Server with a Sybase
database.
Are there any still out there? (I already have the code. I just need
to get it ready on the server.)
Thanks in advance
Michael Congdon
mscongdon@hotmail.com
------------------------------
Date: Thu, 08 Oct 1998 20:45:26 GMT
From: jesten@wdynamic.com
Subject: Re: database problem..need urgent help!!!!!!!
Message-Id: <6vj896$rkb$1@nnrp1.dejanews.com>
In article <01bdf261$4bc2a980$2bbe10ac@amipnet>,
"AMIP" <sroque@man.amis.com> wrote:
> what does this error mean?
>
> Can't locate database.sub in @INC
>
It means that the file database.sub is not in any directory that Perl is
automatically searching via the @INC array... (meaning you are either missing
the file, or you don't have it anywhere that Perl knows where to look for it)
Jim
--
Jim Esten, Lead Developer, WebDynamic/
Applications Lead, StarQuest Internet Services
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 08 Oct 1998 14:38:20 -0800
From: madame philosophe <mp@mkt2mkt.com>
To: "John A. Miller" <patheon@ns.net>
Subject: Re: Difficulty with HTML & Perl & CGI
Message-Id: <361D3EBF.49E7734B@mkt2mkt.com>
Hi John,
it could have to do with your capitalization for start_html attributes.
you might try:
this instead:
#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
$query = new CGI;
print $query->header(),
$query->start_html(-title=>'No Title', -bgcolor=>'white'),
$query->h4({-align=>'center'}, "Testing 4..."),
$query->end_html;
NOTE: I think if you are creating a new CGI object you want to write:
use CGI;
rather than
use CGI qw( :standard);
This is because the standard group of methods in the module is only for
html, cgi, and forms if my memory serves me right. What does that mean? I
think it means you can't use the method new(), as in:
$query = new CGI;
also you can print out with commas after each html shortcut which means
this:
#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
$query = new CGI;
print $query->header(), $query->start_html(-title=>'No Title',
-bgcolor=>'white'), $query->h4({-align=>'center'}, "Testing 4..."),
$query->end_html;
is the same as the first entry. Make sure you check your commas appear
after your parentheses WHEN YOU ARE USING PRINT, and also that they appear
after the curly brackets:
John A. Miller wrote:
> Greetings:
>
> I have written several HTML pages using Perl. But I have had to spell
> everytkhing out. I would like to be able to use some of the short cuts
> like query->header() but I can't figure out how to do it correctly. (I
> am using Omni HTTPD v2.0 as my web server on an NT machine)
>
> I have been having a lot of trouble trying to get the following to work:
>
> ---------------------------------- Begin
> Script----------------------------------
> #!/usr/bin/perl
>
> use CGI qw(:standard);
> use CGI::Carp qw(fatalsToBrowser);
> $query = new CGI;
> print $query->header();
> print $query->start_html(-TITLE=>'No Title',-BGCOLOR=>'white');
> print "<H4><CENTER>Testing 4...</CENTER></H4>";
> print $query->end_html;
> ---------------------------------- End
> Script----------------------------------
>
> It gives me the infamous "Document Contains No Data" error. I can
> however write the same thing by spelling everything out and the page
> works. I have used this successfully:
> ---------------------------------- Begin
> Script----------------------------------
> #!/usr/bin/perl
>
> print "Content-type: text/HTML\n\n";
> print "<HTML> ";
> print "<HEAD> ";
> print "<TITLE></TITLE>";
> print "</HEAD> ";
> print "<BODY> ";
> print "<H1>Testing 1...</H1>";
> print "</BODY>";
> print "</HTML>";
> ---------------------------------- End
> Script----------------------------------
>
> If I comment out the first two lines...
> ##use CGI qw(:standard);
> ##use CGI::Carp qw(fatalsToBrowser);
>
> I get no errors. But it also doesn't write anything. What am I doing
> wrong?
>
> Thanks,
> John
> patheon@ns.net
------------------------------
Date: Thu, 08 Oct 1998 14:15:45 -0700
From: Brandon Lin <lin@wdg.mot.com>
Subject: Getting the last date modified
Message-Id: <361D2B81.F230E4D9@wdg.mot.com>
I'm a novice to perl. Can anyone please tell me how to get
the last date modified of a file using perl?
Thanks a lot.
Brandon
mailto:lin@wdg.mot.com
------------------------------
Date: Thu, 08 Oct 1998 17:31:50 -0400
From: "Lily Y. Fu" <lily@tigr.org>
Subject: How to lauch search on another machine?
Message-Id: <361D2F46.7B6A@tigr.org>
Hi,
We have some cgi scripts in PERL launched from a webserver
quite computationally intensive,
if the search is performed on the same machine as the
webserver host, it will put a heavy load on the webserver.
Aslo, the search takes so long that the browser would
time out before it gets any result back from the search.
I have two questions:
1. We have another machine (LINUX) is good at computation,
Is there any way to farm the searches out to a delicated
computation machine from the webserver host
and send the result back?
2. If the search takes long time to finish, how
can I make the browser not to time out?
#============== Start time consuming search =========
open(PROG,"/usr/local/bin/Search inputfile datafile |")
|| &Pexit_html("Could not open pipe to Search - misconfiguration
somehere");
$res = new Results;
$res->parse(\*PROG);
#============== Want the above to be done at another machine ===
Thanks for any input and help.
--
Lily Fu
The Institute for Genomic Research
Voice Mail: (301) 838-3557
Email: lily@tigr.org
------------------------------
Date: Thu, 8 Oct 1998 20:36:45 GMT
From: Farhad Farzaneh <ff@otis.arraycomm.com>
Subject: Re: Navigating in a tab seperatet text file
Message-Id: <vuvhlu7puq.fsf@otis.arraycomm.com>
Eagle <eagle@kurir.net> writes:
>
> After opening a tabseperated text file I'm trying to make a while loop
> in which i would like to navigate up and down between different lines.
> I've tried to change the $. operator but this docent actually seem to
> affect what line the program is reading. Is there a simple way to
> accomplish this without opening the same file several times?
>
> Any suggestions?
>
> --------------------------------
> Christian Beer
> cb@austria-travelservice.com
If your file isn't too big for your machine, you could try reading it all
into one array:
open F, "$file";
@in = <F>;
close F;
for ($i=0 ; $i < $#in; $i++ ) {
... work with $i and $in[$i]....
}
I imagine there is a more efficient way as well but this is more efficient
than opening the file several times.
--
Farhad
------------------------------
Date: Thu, 08 Oct 1998 21:16:40 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: Navigating in a tab seperatet text file
Message-Id: <YY9T1.369$wV1.1976697@news2.voicenet.com>
Eagle <eagle@kurir.net> wrote:
>After opening a tabseperated text file I'm trying to make a while loop
>in which i would like to navigate up and down between different lines.
>I've tried to change the $. operator but this docent actually seem to
>affect what line the program is reading. Is there a simple way to
>accomplish this without opening the same file several times?
>
>Any suggestions?
Assuming you're just reading, and not modifying the file:
#!/usr/local/bin/perl -w
# NOT TESTED (much)
use strict;
open HOLD, '<./HOLD' or die "open: $!";
my $flag = 0;
my @offset;
while (<HOLD>) {
set_offset($.);
print "$.] $_";
# An arbitrary spot to perform a seek
if ($. == 6 && !$flag) {
$. = goto_line(3);
die "Can't seek\n" if $. == -1;
$flag = 1;
}
}
close HOLD or die "close: $!";
sub set_offset
{
my $line = shift;
unless ($offset[$line]) {
$offset[$.] = tell HOLD or die "tell: $!";
# print "SET OFFSET: $line ($offset[$line])\n";
}
}
# Won't goto a line we haven't seen yet.
sub goto_line
{
my $line = shift;
return -1 if $line >= @offset;
seek HOLD, $offset[$line], 0 or die "seek: $!";
$line;
}
__END__
This little demo makes liberal use of globals, which is probably a Bad
Thing, but should give you an idea what you need to do.
--
Matt Knecht - <hex@voicenet.com>
------------------------------
Date: Thu, 08 Oct 1998 21:29:41 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Navigating in a tab seperatet text file
Message-Id: <Pine.GSO.4.02A.9810081428210.4710-100000@user2.teleport.com>
On Thu, 8 Oct 1998, Farhad Farzaneh wrote:
> open F, "$file";
Those quote marks are merely misleading. Even when your script is "just an
example" (and perhaps especially in that case!) you should _always_ check
the return value after opening a file. Thanks!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 08 Oct 1998 21:06:34 GMT
From: pramsey@iname.com
Subject: Re: PERL, C++ Software Test Engineer-Chandler, AZ
Message-Id: <361d28fd.691747400@news>
On Thu, 08 Oct 1998 16:03:02 GMT, droby@copyright.com wrote:
>In article <361BFFAB.464EE0BD@home.com>,
> ESS <paulg3@home.com> wrote:
>> Perm Career opportunity:
>>
>> We are offering a $2000 Finder?s Fee for any referral who get placed by
>
>Ok. Here's a referral. misc.jobs.offers
>
>This is not a job posting newsgroup.
Says who, and since when? And who appointed you the enforcer?
------------------------------
Date: Thu, 8 Oct 1998 20:34:44 GMT
From: Farhad Farzaneh <ff@otis.arraycomm.com>
Subject: Re: print bug/feature?
Message-Id: <vuww6a7py3.fsf@otis.arraycomm.com>
lr@hpl.hp.com (Larry Rosler) writes:
> [Posted to comp.lang.perl.misc and a copy mailed.]
>
> In article <6vivl5$rht@news.dtc.hp.com> on 8 Oct 1998 18:18:13 GMT,
> (Gordon Wilson) <gw@dtc.hp.com> says...
> > The following:
> > printf"%1.0f %1.0f %1d %1d\n",9.5,10.5,9.5,10.5;
> >
> > prints:
> > 10 10 9 10
> >
> > This seem rather inconsistent. Shouldn't it be:
> > 9 10 9 10
>
> No.
>
> '%.0f' rounds to the nearest integer, as if you had written
> int($x + ($x >= 0 ? 0.5 : -0.5)).
>
> '%d' truncates to the integer nearest to zero, as if you had written
> int($x).
>
I think the point was that both 9.5 and 10.5 are being rounded to 10. It
should be either
9 10 9 10
or
10 11 9 10
--
Farhad
------------------------------
Date: 08 Oct 1998 16:01:55 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: print bug/feature?
Message-Id: <x3y90iqkeks.fsf@tigre.matrox.com>
gw@dtc.hp.com ((Gordon Wilson)) writes:
>
> The following:
> printf"%1.0f %1.0f %1d %1d\n",9.5,10.5,9.5,10.5;
>
> prints:
> 10 10 9 10
>
> This seem rather inconsistent. Shouldn't it be:
> 9 10 9 10
No it shouldn't ...
If you take a look at the printf(3) manpage you'll see why:
f The double args is converted to decimal nota-
tion in the style [-]ddd.ddd, where the
number of digits after the decimal-point
character (see setlocale(3C)) is equal to the
precision specification. If the precision is
omitted from arg, six digits are output; if
the precision is explicitly zero and the #
flag is not specified, no decimal-point char-
acter appears. If a decimal-point character
appears, at least 1 digit appears before it.
The value is rounded to the appropriate
number of digits.
The last sentence is the key! Since Perl's printf() is almost
identical to C's printf(3) function (except for one tiny difference),
it behaves the same way.
Definitely a feature!
--
Ala Qumsieh | No .. not Just Another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: 8 Oct 1998 21:14:13 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: Q: Speed up a regular expression
Message-Id: <6vj9v5$lj0$1@news.NERO.NET>
droby@copyright.com wrote:
: 2) We'll need a bigger box than an AlphaServer 1000A if we move our database
: to Unix. Hmmm. Maybe I have to install Perl on VMS and run the benchmark
: there. Or get someone else to run the benchmark on VMS. ;-)
Your wish is my command. :-)
Benchmark: timing 262144 iterations of one_regex0, one_regex1, one_regex2,
two_regex0, two_regex1, two_regex2...
one_regex0: 2 secs ( 1.61 usr 0.00 sys = 1.61 cpu)
one_regex1: 2 secs ( 2.31 usr 0.00 sys = 2.31 cpu)
one_regex2: 3 secs ( 2.39 usr 0.00 sys = 2.39 cpu)
two_regex0: 3 secs ( 2.00 usr 0.00 sys = 2.00 cpu)
two_regex1: 3 secs ( 2.05 usr 0.00 sys = 2.05 cpu)
two_regex2: 3 secs ( 2.47 usr 0.00 sys = 2.47 cpu)
Perl 5.004_04, OpenVMS Alpha 7.1, 433 MHz EV56
Benchmark: timing 262144 iterations of one_regex0, one_regex1, one_regex2,
two_regex0, two_regex1, two_regex2...
one_regex0: 3 wallclock secs ( 3.16 usr + 0.00 sys = 3.16 CPU)
one_regex1: 4 wallclock secs ( 2.91 usr + 0.00 sys = 2.91 CPU)
one_regex2: 2 wallclock secs ( 2.93 usr + 0.00 sys = 2.93 CPU)
two_regex0: 2 wallclock secs ( 2.43 usr + 0.00 sys = 2.43 CPU)
two_regex1: 2 wallclock secs ( 2.56 usr + 0.00 sys = 2.56 CPU)
two_regex2: 2 wallclock secs ( 2.54 usr + 0.00 sys = 2.54 CPU)
Perl 5.005_02, OpenVMS Alpha 7.1, 433 MHz EV56
Dan
------------------------------
Date: Thu, 08 Oct 1998 22:27:58 +0200
From: Igor <supra@ucentral.ml.org>
Subject: select
Message-Id: <361D204E.3BD3@ucentral.ml.org>
Hello!!!
Please submit any working example for:
select ( $rbits, $wbits, $ebits, $timeout )
I just can't make it work.
Thanks, Igor.
------------------------------
Date: Thu, 08 Oct 1998 20:48:51 GMT
From: jesten@wdynamic.com
Subject: Re: What perl modules do I have???????
Message-Id: <6vj8fj$rta$1@nnrp1.dejanews.com>
In article <361c0e22.0@news.cgocable.net>,
tekkin@hotmail.com (Ken Williams) wrote:
> How do I find out what perl modules I have installed? Is there a switch or
> something? perl -v just tells me the version number. I running 5.004 on
> Linux 2.0.35.
>
> Thanks.
>
I've got a little script I call sleuth.pl that, among other things, loops
throug all the directories in @INC and print out the filenames...
.. ask me direct if you like a copy... not exactly brain surgery, but save you
some typing..
Jim
--
Jim Esten, Lead Developer, WebDynamic/
Applications Lead, StarQuest Internet Services
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3931
**************************************