[13242] in Perl-Users-Digest
Perl-Users Digest, Issue: 652 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 26 12:07:33 1999
Date: Thu, 26 Aug 1999 09:05:09 -0700 (PDT)
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, 26 Aug 1999 Volume: 9 Number: 652
Today's topics:
Re: <ilayer> and cgi stumper <gellyfish@gellyfish.com>
Re: <ilayer> and cgi stumper (Abigail)
Re: Accounts and CPAN module <lars@thegler.dk>
Re: Accounts and CPAN module (Abigail)
Call subroutines in an IF statement? ("willow")
Re: Call subroutines in an IF statement? <jpeterson@office.colt.net>
Help: Perl replace special char from multiple form fiel <jb_1099@hotmail.com>
Re: Help: Perl replace special char from multiple form <jpeterson@office.colt.net>
Re: Images <gellyfish@gellyfish.com>
Re: Images <jpeterson@office.colt.net>
Re: Images <jimmy@blackhole-designs.com>
Re: inet_ntoa on HPUX 10.20 (Rick Jones)
Re: Perl a Black Sheep? <aqumsieh@matrox.com>
Problem enabling Cookies when using LWP::UserAgent <douglas@home.com>
Re: REMOTE_HOST not showing results (Bill Moseley)
Re: REMOTE_HOST not showing results <flavell@mail.cern.ch>
Re: Select Multiple Form Field via Perl into Oracle err <jb_1099@hotmail.com>
Re: Select Multiple Form Field via Perl into Oracle err (Larry Rosler)
Sorting by third field in a random access database <andrew@linksnetwork.com>
Re: text file reading > newfile (Bill Moseley)
Re: text file reading > newfile (Gary O'Keefe)
Re: Tough RegEx TWO - Its almost perfect BUT.. (Abigail)
Re: Why use Python when we've got Perl? (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Aug 1999 16:06:47 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: <ilayer> and cgi stumper
Message-Id: <37c55807_1@newsread3.dircon.co.uk>
noah <noahNOraSPAM@salemglobal.com> wrote:
> Does anyone have any experience using Netscape's <ILAYER>
> tag? I tried using
> it in a CGI form as an SSI work-around, which seemed to
> work fine, except
> that a CGI global expression that I used later in the page
> now doesn't
> appear. Any suggestions?
>
I fail to see what this has to do with Perl.
/J\
--
"The chef's salty balls have dropped" - Christopher Price, BBC NEWS 24
------------------------------
Date: 26 Aug 1999 10:11:56 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: <ilayer> and cgi stumper
Message-Id: <slrn7sambh.n0r.abigail@alexandra.delanet.com>
noah (noahNOraSPAM@salemglobal.com) wrote on MMCLXXXVI September MCMXCIII
in <URL:news:09920fb9.e27d814b@usw-ex0106-048.remarq.com>:
// Does anyone have any experience using Netscape's <ILAYER>
// tag? I tried using
// it in a CGI form as an SSI work-around, which seemed to
// work fine, except
// that a CGI global expression that I used later in the page
// now doesn't
// appear. Any suggestions?
Two suggestions:
- Fix your news software, it's inserting random line breaks.
- Find a better group to ask your questions in. Your post
is Perl free.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 26 Aug 1999 17:12:52 +0200
From: Lars Thegler <lars@thegler.dk>
Subject: Re: Accounts and CPAN module
Message-Id: <37C55974.4F0F0DBA@thegler.dk>
Bob Kline wrote:
>
> The general advice I have seen on building the CPAN modules on UNIX
> systems is to run all steps except the last (the 'make install')
> using an account other than root, and only su to root for the
> 'make install' step, since the standard UNIX perl installation
> needs it. How does one do this using the CPAN shell?
The central point is that the 'make install' must be run as root. It
doesn't matter what user you run the preceeding steps as. I usually run
'perl -MCPAN -e shell' as root anyway.
/Lars
------------------------------
Date: 26 Aug 1999 10:15:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Accounts and CPAN module
Message-Id: <slrn7samia.n0r.abigail@alexandra.delanet.com>
Jonathan Stowe (gellyfish@gellyfish.com) wrote on MMCLXXXVI September
MCMXCIII in <URL:news:37c5514c_2@newsread3.dircon.co.uk>:
;;
;; I have been using 'sudo' - but generally you will either want to run
;; the CPAN installation as root (where it will install with no problem) or
;; run the install as a normal user - it will generally fail when it actually
;; goes to install the files to where they will finally live : at this point
;; you will have to su root and continue the install by cd'ing to .cpan/build/
;; <whatever> and run 'make install' ...
That of course assumes your Perl installation is owned by root.
But there's no reason it should be owned by root. And since everyone
can put a package in CPAN, I'm don't like blindy running 'make' or
'make install' as root.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 26 Aug 1999 07:19:19 -0800
From: chettah@msn.com ("willow")
Subject: Call subroutines in an IF statement?
Message-Id: <LTcx3.5042$C%.3477835@WReNphoon3>
Is it possible to call several subroutines within an IF statement? Or
should I be calling a single block instead?
I keep getting syntax errors with the following:
if ($0 = "RIPS_EARNED_MPS".* ) {
&sortearned;
&mpsrecd;
&mpssent;
&evalsum;
}
elsif ($0 = "RIPS_BILLING".* ) {
&sortbilled;
&caprecd;
&capsent;
&evalsum;
}
else {
die "Invalid file for validation \n";
}
Thanks,
Tara Pillion
-**** Posted from RemarQ, http://www.remarq.com/?a ****-
Search and Read Usenet Discussions in your Browser - FREE -
------------------------------
Date: Thu, 26 Aug 1999 15:53:46 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: Call subroutines in an IF statement?
Message-Id: <eqdx3.17$RY.383@news.colt.net>
"willow" <chettah@msn.com> wrote:
> Is it possible to call several subroutines within an IF statement? Or
Yes, it is.
> I keep getting syntax errors with the following:
You should tell us exactly what the errors are, it' easier to help then...
>
> if ($0 = "RIPS_EARNED_MPS".* ) {
> &sortearned;
> &mpsrecd;
> &mpssent;
> &evalsum;
> }
<traditional>^M isn't a valid Perl statement</traditional>
That aside, maybe your if statement should look more like...
if ($0 =~ /RIPS_EARNED_MPS.*/ ){
...
}
??
------------------------------
Date: Thu, 26 Aug 1999 16:36:33 +0100
From: "JB" <jb_1099@hotmail.com>
Subject: Help: Perl replace special char from multiple form field (was Select Multiple Form Field via Perl into Oracle error)
Message-Id: <jbdx3.26$2B2.6134@news.enterprise.net>
Hi,
Just found that selecting more than one item in a "select multiple" form
field adds an odd character between each item selected. Any idea, using
PERL, how to find out what it is so i can strip it out in my script? Tried
search/replace on \t, \r, \n, \f, \e, \v, \b but it doesn't appear to be one
of these.....can't seem to find any reference to what it can be anywhere
strangely.
Many thanks
Ian
------------------------------
Date: Thu, 26 Aug 1999 15:57:54 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: Help: Perl replace special char from multiple form field (was Select Multiple Form Field via Perl into Oracle error)
Message-Id: <6udx3.18$RY.383@news.colt.net>
JB <jb_1099@hotmail.com> wrote:
> Hi,
> Just found that selecting more than one item in a "select multiple" form
> field adds an odd character between each item selected. Any idea, using
> PERL, how to find out what it is so i can strip it out in my script? Tried
It's a null character, represented in Perl by \0 where 0 is a zero. So,
you can make an array of the selected options like this:
@options = split /\0/, $input;
> of these.....can't seem to find any reference to what it can be anywhere
> strangely.
I imagine it is in the CGI spec, and if you are using cgi-lib.pl, I think it
is mentioned in the documentation for that.
------------------------------
Date: 26 Aug 1999 16:08:53 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Images
Message-Id: <37c55885_1@newsread3.dircon.co.uk>
Jimmy Humphrey <jimmy@blackhole-designs.com> wrote:
> Jimmy Humphrey wrote:
>
>> I was wondering where I might find information on editing images in perl
>> so I can make thumbnails. I can't install any special program because
>> I'm on a virtual host. Also, is there anyway (via command line) to see
>> if a perl module exist on the system or not?
>>
> Oh yeah, I'm using the GD.pm
>
Well you answered your own question there didnt you - it is covered in the GD
modules documentation.
/J\
--
"They're called Virgin Trains because they don't go all the way" -
Simon Hoggart, The Guardian
------------------------------
Date: Thu, 26 Aug 1999 15:11:05 GMT
From: Jon Peterson <jpeterson@office.colt.net>
Subject: Re: Images
Message-Id: <dOcx3.16$RY.383@news.colt.net>
Jimmy Humphrey <jimmy@blackhole-designs.com> wrote:
> I was wondering where I might find information on editing images in perl
> so I can make thumbnails. I can't install any special program because
> I'm on a virtual host. Also, is there anyway (via command line) to see
> if a perl module exist on the system or not?
Image::Magick is the module you are looking for. If your ISP won't let you
install this, then you should upgade your ISP. You should be able to install
both ImageMagick (the the application) and Image::Magick (The perl interface)
in you user directory, although it will involve editing paths and makefiles
and what have you.
Try to execute 'perl -MWibble' to see if Wibble is installed
correctly on your system. If it isn't installed, you'll get an error along
the lines of "Can't locate Wibble.pm in @INC......"
------------------------------
Date: Thu, 26 Aug 1999 15:32:02 GMT
From: Jimmy Humphrey <jimmy@blackhole-designs.com>
Subject: Re: Images
Message-Id: <37C55DE0.842A763B@blackhole-designs.com>
--------------4F773FB996B452288750B547
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ok,
I'm trying to resize an original image to a new image and save it to this
new image file. However, I get some freaky stuff printed into my image when
I use the following code. any reason why?
#!/usr/bin/perl
use GD;
open (GIF,"test.gif") || die;
$myImage = newFromGif GD::Image(GIF) || die;
close GIF;
$srcImage = new GD::Image(100,100);
# copy a 25x25 pixel region from $srcImage to
# a larger rectangle starting at (10,10) in $myImage
$myImage->copyResized($myImage,10,10,0,0,50,50,25,25);
$gif_data = $myImage->gif;
open (DISPLAY,">resize.gif") || die "$!";
print DISPLAY $gif_data;
close DISPLAY;
Jimmy
Jimmy Humphrey wrote:
> I was wondering where I might find information on editing images in perl
> so I can make thumbnails. I can't install any special program because
> I'm on a virtual host. Also, is there anyway (via command line) to see
> if a perl module exist on the system or not?
>
> Jimmy
--------------4F773FB996B452288750B547
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Ok,
<p>I'm trying to resize an original image to a new image and save it to
this new image file. However, I get some freaky stuff printed into my image
when I use the following code. any reason why?
<p><tt>#!/usr/bin/perl</tt><tt></tt>
<p><tt>use GD;</tt><tt></tt>
<p><tt>open (GIF,"test.gif") || die;</tt>
<br><tt>$myImage = newFromGif GD::Image(GIF) || die;</tt>
<br><tt>close GIF;</tt>
<br><tt></tt>
<br><tt></tt> <tt></tt>
<p><tt>
$srcImage = new GD::Image(100,100);</tt>
<br><tt>
# copy a 25x25 pixel region from $srcImage to</tt>
<br><tt>
# a larger rectangle starting at (10,10) in $myImage</tt>
<br><tt>
$myImage->copyResized($myImage,10,10,0,0,50,50,25,25);</tt>
<br><tt></tt>
<br><tt></tt> <tt></tt>
<p><tt>$gif_data = $myImage->gif;</tt>
<br><tt>open (DISPLAY,">resize.gif") || die "$!";</tt>
<br><tt>print DISPLAY $gif_data;</tt>
<br><tt>close DISPLAY;</tt><tt></tt>
<p>Jimmy
<p>Jimmy Humphrey wrote:
<blockquote TYPE=CITE>I was wondering where I might find information on
editing images in perl
<br>so I can make thumbnails. I can't install any special program because
<br>I'm on a virtual host. Also, is there anyway (via command line)
to see
<br>if a perl module exist on the system or not?
<p>Jimmy</blockquote>
</html>
--------------4F773FB996B452288750B547--
------------------------------
Date: 26 Aug 1999 16:01:57 GMT
From: foo@bar.baz (Rick Jones)
Subject: Re: inet_ntoa on HPUX 10.20
Message-Id: <7q3odl$10j$2@ocean.cup.hp.com>
rstagg@my-deja.com wrote:
: Under Linux, it works perfectly. Using the same version of Perl
: (static binary distribution from the Liverpool University HPUX
: porting centre), it fails to perform the inet_ntoa() that I need:
: /usr/lib/dld.sl: Unresolved symbol: inet_ntoa (code) from
: opt/perl5/lib/PA_RISC1.1/5.00404/auto/Socket/Socket.sl
# man inet_ntoa
Reformatting entry. Wait... done
inet(3N) inet(3N)
NAME
inet_addr(), inet_network(), inet_ntoa(), inet_makeaddr(),
inet_lnaof(), inet_netof() - Internet address manipulation routines
SYNOPSIS
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Are the above three include files being included? That would be where
I would start.
rick jones
--
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to email, or post, but please do not do both...
my email address is raj in the cup.hp.com domain...
------------------------------
Date: Thu, 26 Aug 1999 10:11:44 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Perl a Black Sheep?
Message-Id: <x3yogfuws0w.fsf@tigre.matrox.com>
siafhir2@my-deja.com writes:
> I'm also new to Perl, and I'm working for a small company that has hired
> me as their first Internet programmer. We focus on compatibility with
> both IE and Netscape. There's probably an MS language that can be a
> worthy competition to Perl, and easier to use, but there's a good chance
> that not all of it's functions is compatible to Netscape.
What are you talking about? Perl was NOT developped to be a CGI
programming language. The fact that it is the "duct-tape of the
internet" now is a strong proof of Perl's power. C with all it's might
couldn't do that. Not even MS with it's ASP. Can you run an ASP script
on Linux, Unix, VMS and Winblows with absolutely no modifications?
Absolutely not.
There are no MS languages that can be a worthy competition to
Perl. There will never be such a language from MS simply because
backward compatibility and portability are never an issue for them
(while they are primary issues for Perl's development). MS will
actually make newer version of an existing software deliberately
incompatible with older ones so that people will be forced to buying
(and hence PAYing $$$$) a new version every year. Just look at the
win9x joke.
> Since Java is
> still young, and can't do a lot of the things Perl can, I'm stuck with
> Perl, so I might as well try to make friends with it instead of
> snarling.
Java and Perl were developped for different domains. Keep that in
mind. It is useless to compare languages the way you do.
It seems that you are using Perl because you have to, not because you
like to. If you don't to use Perl then don't. Use C. Use Python. Use
ASP. But, IMO, you will be missing a lot of fun (tm).
--Ala
------------------------------
Date: Thu, 26 Aug 1999 15:52:19 GMT
From: Douglas Galbraith <douglas@home.com>
Subject: Problem enabling Cookies when using LWP::UserAgent
Message-Id: <37C562AE.8BE81D47@home.com>
Hello, and thanks in advance for the help.
I'm trying to read data from a Web site that requires the perl script to
have cookies enabled. According to the LWP::UserAgent documentation,
the method "ua->cookie_jar($cookies);" should tell the server that
cookies are accepted. But the response from the server states:
"We're sorry, but you must have cookies enabled in your browser to
use our web site."
Below is a simple script illustrating my problem.
How do I get it to work?
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->cookie_jar($cookies); #enable cookies
$request = HTTP::Request->new(GET =>
'http://quotes.freerealtime.com/rt/frt/quotes?symbol=ACTL');
$request->authorization_basic('D046', 'D046'); #password
$response = $ua->request($request);
print $response->content;
thanks,
DGalbra862@aol.com
------------------------------
Date: Thu, 26 Aug 1999 08:01:01 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: REMOTE_HOST not showing results
Message-Id: <MPG.122ef686e5f345359896da@nntp1.ba.best.com>
martyg8517@my-deja.com (martyg8517@my-deja.com) seems to say...
> I've written a script which needs to use the environment variable
> REMOTE_HOST, eg
use CGI and use its remote_host function.
'remote_host' => <<'END_OF_FUNC',
sub remote_host {
return $ENV{'REMOTE_HOST'} || $ENV{'REMOTE_ADDR'}
|| 'localhost';
}
See, Lincoln's thought of these things already.
> print "$ENV{'REMOTE_HOST'}";
(useless use of quotes here)
> Is this something that is turned on and off with Apache? If so, how?
Yes.
HostnameLookups
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 26 Aug 1999 17:02:12 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: REMOTE_HOST not showing results
Message-Id: <Pine.HPP.3.95a.990826165818.11032I-100000@hpplus03.cern.ch>
On Thu, 26 Aug 1999 martyg8517@my-deja.com wrote:
> Is this something that is turned on and off with Apache?
Yes
> If so, how?
That's not a Perl question. And it's rude to post essentially the same
question separately to several usenet groups. Apache has excellent
documentation. Feed "REMOTE_HOST to its search engine
http://search.apache.org/ and start reading. Within about 20-30 seconds
you'd have your answer.
------------------------------
Date: Thu, 26 Aug 1999 16:16:24 +0100
From: "JB" <jb_1099@hotmail.com>
Subject: Re: Select Multiple Form Field via Perl into Oracle error
Message-Id: <gYcx3.25$2B2.6097@news.enterprise.net>
I tried this already but have since discovered an odd character in there but
have no idea what it is - i've tried eplacing all \t, \r, \v, \b, \n, \f
characters but it aint on of them. Anyone got a way to interpret or convert
characters in a string to a readable format for stripping out in Perl?
Thanks
Ian
Makarand Kulkarni <makkulka@cisco.com> wrote in message
37C4853F.8B788040@cisco.com...
>[ Simmo wrote:
>
>> my $sql = qq{ $SQL1 };
>> my $sth=$dbh->prepare( $sql );
>> $sth->execute();
>
>A check you can do here is to print $sql before it is passed to prepare().
If
>prepare() complains then hand over this query string ( without the
enclosing
>quotes if any ) to SQLplus and see what error it complains about.
>--
>
>
------------------------------
Date: Thu, 26 Aug 1999 08:46:00 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Select Multiple Form Field via Perl into Oracle error
Message-Id: <MPG.122f010a1db4bf6d989ead@nntp.hpl.hp.com>
In article <gYcx3.25$2B2.6097@news.enterprise.net> on Thu, 26 Aug 1999
16:16:24 +0100, JB <jb_1099@hotmail.com> says...
> I tried this already but have since discovered an odd character in there but
> have no idea what it is - i've tried eplacing all \t, \r, \v, \b, \n, \f
> characters but it aint on of them. Anyone got a way to interpret or convert
> characters in a string to a readable format for stripping out in Perl?
unpack 'H*', $string
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 26 Aug 1999 14:53:42 +0100
From: "LinksNetwork Admin" <andrew@linksnetwork.com>
Subject: Sorting by third field in a random access database
Message-Id: <7q3men$495$1@nclient11-gui.server.virgin.net>
Hi,
I have a large database in which every record is 415 bytes long. There are
two 5-byte fields followed by a 50-byte field, plus others. I want to sort
the whole lot in ascending alphabetical order by the third field.
A quick rummage in the manpages revealed sort(), but I don't know how I can
use it in this way.
Any suggestions gratefully accepted.
Andrew.
------------------------------
Date: Thu, 26 Aug 1999 08:09:43 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: text file reading > newfile
Message-Id: <MPG.122ef88fae1c86409896db@nntp1.ba.best.com>
Malcolm Garbutt (mgarbutt@ozland.net.au) seems to say...
> What I want to do is read a text file that has invoice records separate
> by the word new,
ok Read about setting $/ = 'new' or some version of 'new' that make it
the unique record separator. (Why would "new" seem like a good choice
of a record separator?)
> the next line of the record is a username, that I want
> to be the name of an output file which is to contain the contents
> between the new statements.
Then read about split with \n as the pattern and grab the first element
of the array.
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Thu, 26 Aug 1999 15:50:17 GMT
From: gary@onegoodidea.com (Gary O'Keefe)
Subject: Re: text file reading > newfile
Message-Id: <37c55f28.25324890@news.hydro.co.uk>
A keyboard was whacked upside Malcolm Garbutt's head and out came:
>Hi Guys, Gals and Guru's,
>
>I have been reading the perl online doc's, newsgroups and Que's Perl 5
>by example book to solve a small job I want to do, but I can't seem to
>grasp the code I need to write.
>If someone could write the small code for me I would appreciate it.
>
>What I want to do is read a text file that has invoice records separate
>by the word new, the next line of the record is a username, that I want
>to be the name of an output file which is to contain the contents
>between the new statements.
>For example the text file below has 2 records in the usernames of max
>and evih, I would like the data for max to be read and written to a text
>file called max, then the data for evih read and written to a text file
>called evih, etc.
[ I hope for your sake that wasn't genuine personal ]
[ financial records that I just snipped. ]
Try this:
#!/usr/local/bin/perl -w
use strict;
# redefine the end-of-line marker
# now every record is a line
$/ = "new\n";
while ( <DATA> ) {
# remove the end-of-line chars and if the line has words on
# it, get the first word for the filename
chomp;
if ( m/(\w+)/ ) {
open ( OUT, ">$1" ) ||
die "Could not open $1 for writing. $!.\n";
print OUT;
close ( OUT ) ||
die "Could not close $1 after writing. $!.\n";
}
}
__DATA__
[ insert the test data that I'm not going to republish here ]
Hope that helps
Gary
--
Gary O'Keefe
gary@onegoodidea.com
You know the score - my current employer has nothing to do with what I post
------------------------------
Date: 26 Aug 1999 10:28:42 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Tough RegEx TWO - Its almost perfect BUT..
Message-Id: <slrn7sanau.n0r.abigail@alexandra.delanet.com>
Paul Dobbs (pdobbs@home.com) wrote on MMCLXXXVI September MCMXCIII in
<URL:news:37C52F80.DC196C73@home.com>:
'' Some great help and ideas from people here, thank-you kindly!
'' I just need one more alteration to a replace function to get
'' it doing just what it should, and I'm stuck on how to
'' perform a NOT my operand.
That would be a mighty hairy regex. And let me repeat what I said
before: if the text you are dealing with resembles HTML, any single
regex approach is going to fail utterly.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 26 Aug 1999 10:33:03 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Why use Python when we've got Perl?
Message-Id: <slrn7sanj3.n0r.abigail@alexandra.delanet.com>
David Oppenheimer (davidopp@megsinet.net) wrote on MMCLXXXVI September
MCMXCIII in <URL:news:37C552DF.9F90BA36@megsinet.net>:
$$
$$ That being said, are there ways to integrate Python and Perl to do things
$$ that neither one can do alone?!
Since Python and Perl are Turing equivalent, what things are you refering to?
Abigail
--
perl -wle 'print "Prime" if (0 x shift) !~ m 0^\0?$|^(\0\0+?)\1+$0'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 652
*************************************