[10330] in Perl-Users-Digest
Perl-Users Digest, Issue: 3923 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 7 19:07:29 1998
Date: Wed, 7 Oct 98 16:01:37 -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 Wed, 7 Oct 1998 Volume: 8 Number: 3923
Today's topics:
Re: Perl-based script for a metasearch engine (Jonathan Murphy)
Re: Perl-based script for a metasearch engine <rootbeer@teleport.com>
Re: Perl-based script for a metasearch engine (Jonathan Murphy)
Re: Perl-based script for a metasearch engine (Martien Verbruggen)
perl_destruct_level - AWOL in LinuxPPC (John Edstrom)
Re: Q: Speed up a regular expression bhoylma@uswest.com
Re: Q: Speed up a regular expression bhoylma@uswest.com
Realtime Blackhole List gives different no error in Win jmrubin@cyberspace.org
reg-exp: "Buy!!!" -> "Buy!" ? <alex@kawo2.rwth-aachen.de>
Re: reg-exp: "Buy!!!" -> "Buy!" ? <rootbeer@teleport.com>
Re: regexps and cntl chars <aqumsieh@tigre.matrox.com>
Re: scope of my using () (Mark-Jason Dominus)
Re: send geroge reese (was Re: Call for Participation: <zenin@bawdycaste.org>
Re: send geroge reese (was Re: Call for Participation: (Abigail)
Re: talking to myself (pg 343 camel book [2nd edition]) <rick.delaney@shaw.wave.ca>
timelocal question form a perl newbie <jonesr@pjmexch01.pjm.com>
Re: timelocal question form a perl newbie <rootbeer@teleport.com>
Re: typeglobs <jhi@alpha.hut.fi>
Using Split and Join cacharbe@my-dejanews.com
Re: Using Split and Join <rootbeer@teleport.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 07 Oct 1998 21:28:41 GMT
From: jmurphy@nospam.com2000.net (Jonathan Murphy)
Subject: Re: Perl-based script for a metasearch engine
Message-Id: <jmurphy-ya02408000R0710981726470001@news.com2000.net>
I searched all major engines and can't find one yet.
Maybe you can point me to a URL or two?
Thanks,
Jmurphy
In article <Pine.GSO.4.02A.9810071345350.4710-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:
> On Wed, 7 Oct 1998, Jonathan Murphy wrote:
>
> > Is there a Perl-based script for a metasearch engine?
>
> Yes.
>
> If you're wishing merely to _find_ (as opposed to write) programs,
> this newsgroup may not be the best resource for you. There are many
> freeware and shareware archives which you can find by searching Yahoo
> or a similar service. Hope this helps!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 21:57:18 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl-based script for a metasearch engine
Message-Id: <Pine.GSO.4.02A.9810071448110.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Jonathan Murphy wrote:
> I searched all major engines and can't find one yet.
>
> Maybe you can point me to a URL or two?
In my attempt to be polite I seem to have been sufficiently explicit.
This newsgroup is not a resource for locating web pages. This newsgroup is
a resource for people who need information about Perl which isn't easily
found in the docs. The information you're seeking is not _about_ Perl,
even though it may be a program written in Perl. (If you were trying to
locate a book about skiing, a newsgroup about ink would not be a good
resource.)
Here is a URL of a resource for locating web pages.
http://www.yahoo.com/
If you can't find what you want, follow a link on that page. If you still
don't see what you want, follow another link. Repeat as needed. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 22:29:21 GMT
From: jmurphy@nospam.com2000.net (Jonathan Murphy)
Subject: Re: Perl-based script for a metasearch engine
Message-Id: <jmurphy-ya02408000R0710981827270001@news.com2000.net>
Tom,
Stop being a fucking jerk, OK???
I found what I've been looking for already.
So go back to your little hole, you pea brain!
Jmurphy
In article <Pine.GSO.4.02A.9810071448110.4710-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@teleport.com> wrote:
> On Wed, 7 Oct 1998, Jonathan Murphy wrote:
>
> > I searched all major engines and can't find one yet.
> >
> > Maybe you can point me to a URL or two?
>
> In my attempt to be polite I seem to have been sufficiently explicit.
>
> This newsgroup is not a resource for locating web pages. This newsgroup is
> a resource for people who need information about Perl which isn't easily
> found in the docs. The information you're seeking is not _about_ Perl,
> even though it may be a program written in Perl. (If you were trying to
> locate a book about skiing, a newsgroup about ink would not be a good
> resource.)
>
> Here is a URL of a resource for locating web pages.
>
> http://www.yahoo.com/
>
> If you can't find what you want, follow a link on that page. If you still
> don't see what you want, follow another link. Repeat as needed. Cheers!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 07 Oct 1998 22:49:20 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl-based script for a metasearch engine
Message-Id: <QdSS1.42$5j2.84073@nsw.nnrp.telstra.net>
[Followups set]
In article <jmurphy-ya02408000R0710981827270001@news.com2000.net>,
jmurphy@nospam.com2000.net (Jonathan Murphy) writes:
> Tom,
>
> Stop being a fucking jerk, OK???
Tom is not being a jerk. He is being much more polite to you than you
deserve. he explained very nicely to you that this group is here to
discuss perl issues, not to hold your hand while you surf the web.
> I found what I've been looking for already.
See? Now, how hard was that? If you had even bothered to have a look
at the standard web search engines and archives, you would have found
this without annoying all of us with your laziness.
> So go back to your little hole, you pea brain!
Hmm. I don't think you really know what you're saying there. We'll
call it inexperience and pettiness, and leave it at that.
*PLONK*
FYI: that was the sound of your details being entered in my killfile,
so I don't make the mistake of ever responding to one of your posts
again. Others probably silently already have done so, because of this
post.
See ya, or rather: won't.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd. | network - Mitchell Kapor
NSW, Australia |
------------------------------
Date: 7 Oct 1998 21:04:21 GMT
From: edstrom@hmsc.orst.edu (John Edstrom)
Subject: perl_destruct_level - AWOL in LinuxPPC
Message-Id: <6vgl0l$ksv$1@news.NERO.NET>
Has anyone here succeeded in building perl 5.00[4_04 or 5_02] with shared
libraries under linux ppc? I keep failing due to unresolved
Perl/PL_perl_destruct_level symbols.
The static libperl for both seem to work OK, including dynamic
loading. I use the default configuration except to enable dynamic
loading and the shared libperl option. I don't enable threads in
5.005.
perl5.004 builds without a hitch but fails the IO module test with:
./perl: error in loading shared libraries
: undefined symbol: Perl_perl_destruct_level
make: *** [test] Error 127
The perl 5.005 build dies at the IO module with the error message:
../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
-noprototypes -typemap ../../lib/ExtUtils/typemap IO.xs
../../miniperl: error in loading shared libraries
: undefined symbol: PL_perl_destruct_level
Does anyone know which config bit to fiddle to force it to make
generate PL_perl_destruct_level properly?
------------------------------
Date: Wed, 07 Oct 1998 21:21:40 GMT
From: bhoylma@uswest.com
Subject: Re: Q: Speed up a regular expression
Message-Id: <6vgm13$rj6$1@nnrp1.dejanews.com>
In article <6vchc6$o23$1@nnrp1.dejanews.com>,
tilman@spp.hpc.fujitsu.co.jp wrote:
> Hello !
>
> Is there a way to speed up this regular expression ?
>
> if ($line =~ /(^$Search )|( $Search )/io)
>
> I want to match a string $Search either in the beginning of $line or
> within the string $line, but then with a leading SPACE.
>
#!/usr/local/bin/perl -w
use BenchMark
my %TRIALS = (
A => qq{/(^$Search )|( $Search )/io},
B => qq{/^\b$Search\b/io});
$_=qq{ abc};
$Search=qq{ a};
$TIMES=100000;
timethese($TIMES,\%SNIPPETS)'
The above execution produces the following results:
Benchmark: timing 100000 iterations of A, B...
A: 3 secs ( 1.56 usr 0.00 sys = 1.56 cpu)
B: 2 secs ( 0.86 usr 0.00 sys = 0.86 cpu)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 07 Oct 1998 21:44:13 GMT
From: bhoylma@uswest.com
Subject: Re: Q: Speed up a regular expression
Message-Id: <6vgnbd$te2$1@nnrp1.dejanews.com>
In article <1dgizeo.u7o9yz1yw0p8gN@roxboro0-005.dyn.interpath.net>,
phenix@interpath.com (John Moreno) wrote:
> Larry Rosler <lr@hpl.hp.com> wrote:
[...]
> > Benchmark: timing 262144 iterations of one_regex0, one_regex1,
> > one_regex2, two_regex0, two_regex1, two_regex2...
> > one_regex0: 14 wallclock secs (14.33 usr + 0.00 sys = 14.33 CPU)
> > one_regex1: 12 wallclock secs (12.29 usr + 0.00 sys = 12.29 CPU)
> > one_regex2: 13 wallclock secs (13.40 usr + 0.00 sys = 13.40 CPU)
> > two_regex0: 8 wallclock secs ( 8.57 usr + 0.00 sys = 8.57 CPU)
> > two_regex1: 12 wallclock secs (11.80 usr + 0.00 sys = 11.80 CPU)
> > two_regex2: 11 wallclock secs ( 9.29 usr + 0.00 sys = 9.29 CPU)
[...]
> > This is perl 5.005_02 on Wintel.
>
> Benchmark: timing 262144 iterations of one_regex0, one_regex1,
> one_regex2, two_regex0, two_regex1, two_regex2...
> one_regex0: 9 secs ( 9.60 usr 0.00 sys = 9.60 cpu)
> one_regex1: 12 secs (13.22 usr 0.00 sys = 13.22 cpu)
> one_regex2: 14 secs (14.37 usr 0.00 sys = 14.37 cpu)
> two_regex0: 14 secs (12.80 usr 0.00 sys = 12.80 cpu)
> two_regex1: 15 secs (12.33 usr 0.00 sys = 12.33 cpu)
> two_regex2: 18 secs (15.98 usr 0.00 sys = 15.98 cpu)
>
> This is perl 5.004 on the Mac.
>
Benchmark: timing 262144 iterations of one_regex0, one_regex1, one_regex2,
two_regex0, two_regex1, two_regex2...
one_regex0: 8 secs ( 7.23 usr 0.00 sys = 7.23 cpu)
one_regex1: 12 secs (11.18 usr 0.00 sys = 11.18 cpu)
one_regex2: 11 secs (11.83 usr 0.00 sys = 11.83 cpu)
two_regex0: 11 secs (11.05 usr 0.00 sys = 11.05 cpu)
two_regex1: 10 secs (10.64 usr 0.01 sys = 10.65 cpu)
two_regex2: 13 secs (13.29 usr 0.00 sys = 13.29 cpu)
perl 5.004_4, SunSolaris 2.5.1, SparcServer 1000
Interesting results, huh!
Peace.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 07 Oct 1998 21:03:38 GMT
From: jmrubin@cyberspace.org
Subject: Realtime Blackhole List gives different no error in Windows
Message-Id: <6vgkva$pgr$1@nnrp1.dejanews.com>
Hi. I'm trying to use the following script, downloaded from Usenet, which
determines whether a given mail server is on vix.com's spamming blackhole
list.Essentially, it gets the host IP, reverses the numbers, and then looks
for IP.rbl.vix.com. If that resolves to 127.0.0.2 then you have a hit.
For example, 208.166.8.30 is blackholed because 30.8.166.208.rbl.vix.com
resolves to 127.0.0.2.
Well, on when I've tried Unix Perl's, it works as advertised. And, it works as
advertised in Win32 Perl's IF THE SITE IS BLACKHOLED.
But, if the site isn't blackholed, then Win32 (and I've tried at least 3
versions of Perl) gives me:
"No error reported. Try again later?"
whereas Unix tells me that the site isn't on the list.
Right now, I'm using it with Perl 5.004_04 for Sun sun4-sunos and with
ActiveWare Perl for Win32 which says version 5.003_07, build 316. (The one
which is installed by Winux.)
I think the problem may not be with the Perl's but with the difference between
Berkeley sockets and Winsock.
==========[ script ]==========================================
#!/usr/bin/perl
#
# Check to see if a specified IP address is part of
# P. Vixie's Realtime Blackhole List (via library DNS lookup).
#
# See http://maps.vix.com/rbl/ for more informaiton.
#
# rblcheck.pl by Jonathan Stott <jstott+usenet@poly.phys.cwru.edu>
# Version 1.1 (Thu Feb 19, 1998)
# Error codes from my local <netdb.h>.
sub SUCCESS {return 0;} # No error reported
sub HOST_NOT_FOUND {return 1;} #/* Authoritative Answer Host not found */
sub TRY_AGAIN {return 2;} #/* No Non-Authoritive Host or SERVERFAIL */
sub NO_RECOVERY {return 3;} #/* Non recoverable errors */
sub NO_DATA {return 4;} #/* Valid name, no data record of req type */
sub NO_ADDRESS {return 4;} #/* no address, look for MX record */
# Check and make sure we have an argument that isn't '-h' or '-?'.
if (($#ARGV < 0) || ($ARGV[0] eq "-h") || ($ARGV[0] eq "-?"))
{ die "SYNTAX: $0 IP|hostname\n"; }
if ($ARGV[0] =~ /[^.0-9]/) # non-numeric/dot characters -> hostname
{
($name, $aliases, $addrtype, $length, @addrs) = gethostbyname($ARGV[0]);
die "Can't find IP address for host $ARGV[0]\n" if ($#addrs < 0);
@ip = unpack("C4", $addrs[0]); # Turn lookup into 4 ints.
}
else # purely numeric/dot -> IP address.
{ @ip = split(/\./, $ARGV[0]); } # Turn argument into 4 ints.
if ($#ip != 3) # Make sure that it really was an IP address.
{ print "ERROR: $ARGV[0] is not in dotted quad format\n"; exit 1; }
# Format the address for a proper RBL lookup
$hostname = "$ip[3].$ip[2].$ip[1].$ip[0].rbl.maps.vix.com";
# Look up the address. Use the error code returned by gethostbyname()
# to distinguish between found, not found, and true errors.
($name, $aliases, $addrtype, $length, @addrs) = gethostbyname($hostname);
$rc = $?; # Return code (would be h_errno in 'C')
if ($#addrs < 0) # Didn't get a hostname, find out why.
{ &ErrorCondition($rc); }
else
{
@ip = unpack("C4", $addrs[0]);
$ip = join(".", @ip); # Unpack lookup data into a string.
if ($ip ne "127.0.0.2") # Paranoid final sanity check.
{
print "Unexpected IP address returned\n.";
print "Expected \"127.0.0.2\", got \"$ip\"\n";
&ErrorCondition($rc); # Probably pointless, but try it anyway.
}
else # Got a match - host is blacklisted
{ print "Host \"$ARGV[0]\" is in the MAPS blacklist.\n"; }
}
exit 0; # Done
# Given a return code, print the appropriate error message.
sub ErrorCondition # @_ = ( h_errno )
{
my($h_errno) = ( $_[0] );
if ($h_errno == &SUCCESS)
{ print "No error reported. Try again later?\n"; }
elsif (($h_errno == &HOST_NOT_FOUND) || ($h_errno == &NO_ADDRESS))
{ print "Host \"$ARGV[0]\" is NOT in the MAPS blacklist.\n"; }
elsif ($h_errno == &TRY_AGAIN)
{ print "ERROR, request timed out.\n";
print "Unknown RBL status; try again later.\n"; }
elsif ($h_errno == &NO_RECOVERY)
{ print "ERROR, unspecified fatal error.\n"; }
elsif ($h_errno == &NO_DATA)
{ print "ERROR, No data in nameserver response but host exists\n";
print "Host is *probably* in RBL; try again later.\n"; }
else
{ die "FATAL ERROR. unknown error code: $h_errno\n"; }
return;
}
‰
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 07 Oct 1998 22:19:06 +0000
From: Alex Farber <alex@kawo2.rwth-aachen.de>
Subject: reg-exp: "Buy!!!" -> "Buy!" ?
Message-Id: <361BE8DA.621C825@kawo2.rwth-aachen.de>
Hi,
here is a regular expression quiz for you:
How do you change the annoying repeating "!!!"
(in a web board ;-) to a single "!" ?
Thanks in advance
Alex
--
http://www.simplex.ru/pref.html
------------------------------
Date: Wed, 07 Oct 1998 22:40:56 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: reg-exp: "Buy!!!" -> "Buy!" ?
Message-Id: <Pine.GSO.4.02A.9810071538120.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Alex Farber wrote:
> How do you change the annoying repeating "!!!"
> (in a web board ;-) to a single "!" ?
(I'm assuming that you're editing text instead of HTML. If I'm wrong, you
should use a parser to work with the HTML.) You don't even need a pattern.
tr/!//s;
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 07 Oct 1998 15:29:42 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: regexps and cntl chars
Message-Id: <x3y4stgqift.fsf@tigre.matrox.com>
pfeilgm@jmu.edu writes:
>
> I want do substitution on some control characters.
>
> Obviously, "s/^M/\n/g" and such won't work. How can I do this?
>
First read some documentation ..
then,
s/\cM/\n/g;
--
Ala Qumsieh | No .. not Just Another
ASIC Design Engineer | Perl Hacker!!!!!
Matrox Graphics Inc. |
Montreal, Quebec | (Not yet!)
------------------------------
Date: 7 Oct 1998 17:24:28 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: scope of my using ()
Message-Id: <6vgm6c$nl5$1@monet.op.net>
In article <361BB469.50840A12@email.sps.mot.com>,
Tk Soh <r28629@email.sps.mot.com> wrote:
> You may also check to see whether arrays, hashes or
> subroutines exist. Using 'defined' on the predefined
> variables is not guaranteed to produce intuitive results.
> ##
> On the other hand, use of C<defined()> upon aggregates
> (hashes and arrays) is not guaranteed to produce intuitive
> results, and should probably be avoided.
>
>Hmm.. I am confused.
There's no conflict here. Existence is not intuitive.
It's not useful, either, and should probably be avoided.
------------------------------
Date: 7 Oct 1998 20:45:40 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <907792996.953333@thrush.omix.com>
Abigail <abigail@fnx.com> wrote:
: Zenin (zenin@bawdycaste.org) wrote on MDCCCLXIII September MCMXCIII in
>snip<
: ++ $thing = Some::Really::Deep::Package::Name::Foo::makeMeAThing();
: ++ Some::Really::Deep::Package::Name::Foo::doSomethingWithIt($thing);
: ++ Some::Really::Deep::Package::Name::Foo::doSomethingElse($thing);
: ++ $bar = Some::Really::Deep::Package::Name::Bar::makeMeAThing();
:
: Does that mean you are unaware of 'package' and Exporter.pm?
And if you need access to the fooBar() function of six different
packages at once, this method no longer works at all. Sure, you
can play aliasing games (*foo = *Package::foo;), but that gets
really ugly, really quickly.
Personally, I'm much happier with simply:
my $foo = Some::Really::Deep::Package::Name::Foo->new (args);
$foo->fooBar();
$foo->fooBaz();
...etc...
But maybe it's just me, YMMV. Of course, on small projects this
isn't nearly as much of an issue, if at all.
>snip<
: ++ It may be silly, but it's quite a bit more flexible and more
: ++ powerful then most others. The fact that your own closure based
: ++ object can even be done is a testament to that.
:
: Just because it's flexible doesn't mean it isn't a hack.
True. IMHO however, it's the most perlish object model that
probably could have been constructed. It's not perfect, but
it's getting better.
"All languages suck, some just suck less". IMHO Perl's object
model in combination with Perl's other features is far lower on
the suck meter then most other languages, and far more practical.
Sure, "pure" Perl OO by itself is pretty weak, however once its
role within the rest of Perl is understood I think it starts making
much more sense as to why it must be what it is.
If you're never planing on breaking out of an OO world, for any
reason, Perl likely isn't your best choice. However, if your
project is like most others, a completely "pure" OO model doens't
often fit very well. Perl's OO model blends very well with the best
of procedural and functional code paradigms, where most purer OO
modeled languages don't blend well, if at all.
: C is flexible too - that doesn't mean I'd like to use it.
The right tool for the right job. Perl is "The Swiss Army Chain
Saw" of programming languages, so it works for a large number
of jobs, but not all. Sometimes C works better (and not just
speed wise), which is why we have such great bindings to interweave
C code into Perl, and why things like JPL exist.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: 7 Oct 1998 22:13:23 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <6vgp23$bgv$1@client3.news.psi.net>
Zenin (zenin@bawdycaste.org) wrote on MDCCCLXIII September MCMXCIII in
<URL:news:907792996.953333@thrush.omix.com>:
++ Abigail <abigail@fnx.com> wrote:
++
++ And if you need access to the fooBar() function of six different
++ packages at once, this method no longer works at all. Sure, you
++ can play aliasing games (*foo = *Package::foo;), but that gets
++ really ugly, really quickly.
++
++ Personally, I'm much happier with simply:
++
++ my $foo = Some::Really::Deep::Package::Name::Foo->new (args);
++ $foo->fooBar();
++ $foo->fooBaz();
++ ...etc...
Granted, if you want to use OO just because you like to use identical
function names in very long but different packages, Perl's OO might be
nice for you.
I would redesign my software if it came to that.
++ : Just because it's flexible doesn't mean it isn't a hack.
++
++ True. IMHO however, it's the most perlish object model that
++ probably could have been constructed. It's not perfect, but
++ it's getting better.
++
++ "All languages suck, some just suck less". IMHO Perl's object
++ model in combination with Perl's other features is far lower on
++ the suck meter then most other languages, and far more practical.
Odd. I find Perl's OO model very *impractical* because it leaves the
programmer which to many things to do and worry about. Quite opposite
from the rest of Perl. The way Perl does OO is very alien compared to
the rest of Perl.
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
------------------------------
Date: Wed, 07 Oct 1998 22:13:33 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: talking to myself (pg 343 camel book [2nd edition])
Message-Id: <361BE921.D3696075@shaw.wave.ca>
[posted & mailed]
Lance Juno wrote:
>
> I've recently installed 'perl5_00402-bindist04-bc.zip' on my NT and
> have recreated the script shown on page 343 of the camel book (2nd
> edition).
> Problem is that the forking does not work. From the line:
That's right. Windoze doesn't have fork.
perldoc perlwin32
Win32::Process might help.
--
Rick Delaney
rick.delaney@shaw.wave.ca
------------------------------
Date: Wed, 7 Oct 1998 17:27:48 -0400
From: "Jones, Robert" <jonesr@pjmexch01.pjm.com>
Subject: timelocal question form a perl newbie
Message-Id: <B023AD208ADDD0118A09400005D50021029F0561@PJMNT02>
Hi,
Could someone tell me what the 8 arguments in the function "timelocal"
correspond to (i.e., map each argument to its meaning). Also, why does
"timelocal", the supposed "inverse" of the function "localtime", have 8
arguments when "localtime" has 9? Thanks in advance for your answers.
Bob Jones
Computer Analyst
Networking and Platforms Dept.
PJM Interconnection, L.L.C.
(610) 666-8954
jonesr@pjm.com
"Omnia apud me mathematica fiunt."
(With me everything turns into mathematics.)
-- Rene Descartes
"I hope life isn't a big joke, because I don't get it."
-- Deep Thoughts, by Jack Handy
------------------------------
Date: Wed, 07 Oct 1998 22:09:37 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: timelocal question form a perl newbie
Message-Id: <Pine.GSO.4.02A.9810071500090.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998, Jones, Robert wrote:
> Could someone tell me what the 8 arguments in the function "timelocal"
> correspond to (i.e., map each argument to its meaning).
Have you seen its documentation? If you've been given some code without
adequate docs, use a good module from CPAN. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 08 Oct 1998 01:46:51 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: typeglobs
Message-Id: <oeer9wkdm78.fsf@alpha.hut.fi>
Alexander Bibighaus <alexb@sig.net> writes:
> I have been reading the book "Advanced Perl Programming" and
> I am confused on typeglobs.
Basically, they are 'superhandles', direct access to the Perl symbol
tables (the place where all the variables hang out)
> Can someone give me an example of how they use typeglobs?
Aliasing 'foo' so that &foo; is equivalent to &bar;
*foo = \&bar;
> thanks,
>
> alexander
--
$jhi++; # http://www.iki.fi/~jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen
------------------------------
Date: Wed, 07 Oct 1998 21:06:00 GMT
From: cacharbe@my-dejanews.com
Subject: Using Split and Join
Message-Id: <6vgl3o$q53$1@nnrp1.dejanews.com>
[Please RTP as well]
Normally, I wouldn't bother all of you with a question like this, but I have
been banging my head against my monitor for a couple of days trying to figure
out why this doesn't work.
So I figured I'd go right to the camels mouth.
Anyway....
I'm parsing through a text file and pulling out URL's and wrapping them in
html to create links. Everything works fine until I have 2 addresses on one
line, and suddenly, split/join goes to crap. This is what I have:
while (<TESTRUN>){
if ($_ == /^\s.+/){ ##find the blank lines so I can keep formatting as
close ##as possible to text file
print OUT "<br>";
}else {
foreach $word (split){ ###Break the line apart
if ($word =~ /(<A.*)/){###be careful of any formatting already there
}elsif ($word =~ /(http:.*)/) {
$word = "<A href=$url>$url</A>"; ### reformat and shove back
### into string
## $_ = $word; <---- Trouble Spot ##Line where confusion
##really sets in - if I use
##html is kept, but first
##url is lost and if I don't
} ###html is lost....
}
join $_,@_; ###Put it all back together
}
print OUT "$_"; ##And out to the file she goes
}
Erg, please help if you can, or point me at the right resource. I've read
the Faq, perlfunc, win32 and referenced 3 O'Reilly books, but maybe I'm just
missing something simple. I am new at this.
Thank you for any help,
Chuck Charbeneau
ccharbeneau@lear.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Wed, 07 Oct 1998 21:41:48 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Using Split and Join
Message-Id: <Pine.GSO.4.02A.9810071440381.4710-100000@user2.teleport.com>
On Wed, 7 Oct 1998 cacharbe@my-dejanews.com wrote:
> if ($word =~ /(<A.*)/){###be careful of any formatting already there
Don't try to parse HTML with simple patterns. Use a well-debugged module.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
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 3923
**************************************