[18593] in Perl-Users-Digest
Perl-Users Digest, Issue: 761 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 25 11:05:34 2001
Date: Wed, 25 Apr 2001 08:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <988211108-v10-i761@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 25 Apr 2001 Volume: 10 Number: 761
Today's topics:
Re: 5.00503 vs. 5.6.0.623 <prlawrence@lehigh.edu>
Re: Accept credit cards online at only 9.1% service cha (Anno Siegel)
Re: access rights on any RDBMS (Abigail)
Browsing Directories by CGI <stumo@bigfoot.com>
Re: Counting number of chars in a line (part of reading (Anno Siegel)
RE: Counting number of chars in a line (part of reading <ralawrence@mailandnews.co.uk>
RE: Counting number of chars in a line (part of reading <ralawrence@mailandnews.co.uk>
Re: DBM data stores <kellikellin@netscape.net>
Help for scrpit line.. <lckun@informatik.uni-rostock.de>
Re: Help for scrpit line.. <vmurphy@Cisco.Com>
Re: How do I find the OS? (Rafael Garcia-Suarez)
Re: How do I find the OS? <nospam@hotmail.com>
Re: How do I find the OS? (Bernard El-Hagin)
Re: How do I find the OS? <dan@tuatha.sidhe.org>
Re: How to copy an entire directory (Anno Siegel)
Looking at HTTP message <yf32@cornell.edu>
Re: Looking at HTTP message (Rafael Garcia-Suarez)
Re: Lvalue <jonni@ifm.liu.se>
Need help installing forum on server (Chuck Lucas)
Newbie GD question <dharding@uiuc.edu>
Read text files of different format <martin@djernaes.net>
Re: regexp matching with optional part (Greg Bacon)
Re: Regexp Question (Abigail)
Re: So what do YOU use Perl for? (Greg Bacon)
Re: total newbie (Greg Bacon)
Re: Unix Commands from PERL <bart.lateur@skynet.be>
Re: Unix Commands from PERL (Villy Kruse)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 25 Apr 2001 10:07:40 -0400
From: "Phil R Lawrence" <prlawrence@lehigh.edu>
Subject: Re: 5.00503 vs. 5.6.0.623
Message-Id: <9c6lnj$amk@fidoii.CC.Lehigh.EDU>
I had written:
> The following script work under the *older* version of
> Perl on AIX (5.00503), yet fails under a newer, ActiveState
> Perl (5.6.0.623) on Windows98.
>
> Any idea why? Error:
> Can't locate object method "foo" via package "B" at
> inherit.pl line 13.
The problem was with my package name "B". My 5.6.1 distro includes a module
called B.pm... this was the one being loaded by "use base B;".
The following works fine:
package AAA;
sub foo {
my $class = shift;
my $self = {};
bless ($self,$class);
return $self;
}
package BBB;
use base 'AAA';
sub bar {
my $class = shift;
my $b = $class->foo;
}
package CCC;
use base 'BBB';
sub baz {
my $class = shift;
my $c = $class->bar;
}
package main;
$a = AAA->foo;
$b = BBB->bar;
$c = CCC->baz;
print "a: $a ", ref $a, "\n";
print "b: $b ", ref $b, "\n";
print "c: $c ", ref $c, "\n";
$aa = (ref $a)->foo;
$bb = (ref $b)->bar;
$cc = (ref $c)->baz;
print "aa: $aa ", ref $aa, "\n";
print "bb: $bb ", ref $bb, "\n";
print "cc: $cc ", ref $cc, "\n";
------------------------------
Date: 25 Apr 2001 14:01:04 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Accept credit cards online at only 9.1% service charge 3653
Message-Id: <9c6lb0$s1s$2@mamenchi.zrz.TU-Berlin.DE>
According to <greg.polk@polkservices.net>:
> Easy Pay CC www.easypaycc.com
> The Name Says It All
>
> We provide SSL (Secure Sockets Layer) and other encryption security
> features that insure your online transactions are processed securely,
[...]
> Look, the idea was yours, you made the site, you made it successful, now
> shouldn't you be getting the money?
What is this doing on a language discussion group? Go away.
Anno
------------------------------
Date: Wed, 25 Apr 2001 13:37:12 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: access rights on any RDBMS
Message-Id: <slrn9edko8.r6k.abigail@tsathoggua.rlyeh.net>
[Removed comp.lang.perl.modules as this problem doesn't address a
specific module]
Eildert Groeneveld (eg@tzv.fal.de) wrote on MMDCCXCIV September MCMXCIII
in <URL:news:3ae6746f@leda.tzv.fal.de>:
|| Hello Everyone,
|| we are developing a platform independant information system that
|| uses any RDBMS that complies to SQL-92, using a meta level for
|| specification of the business rules. The meta level is currently
|| written in PERL and so are the applications.
||
|| We now have to address the access right control. The requirements
|| are:
|| - be independant from the RDBMS used
|| - restrict access to any column for select, update, delete and insert
|| - restrict access conditional on the content of a column
||
|| One place to implement this would be the meta level. Then we
|| would be completely independant from the RDBMS. However, it implies
|| that no direct interaction from PERL (or any other language) with the
|| backend is possible, creating additional overhead.
||
|| Any thaughts on this problem?
Yes. Entirely independant from the RDBMS you can never be, somewhere
down there you've got to communicate with it.
But I presume you want a database independant API that your applications
use, and use "drivers" to communicate with the databases. Those drivers
could be based on DBI, but maybe you have done something else.
Every database I know of has the access granuality you require. (I don't
know the details of all databases, so I might be wrong here). I would
suggest using the native access control system, but write a database
independant API to modify the access levels. For each supported database
you write a small driver that translates the API to the native calls.
Then you have an independent interface, only overhead when you modify
access control (but that's ok, because that is a relative uncommon
operation) and no additional overhead when doing normal queries.
Abigail
--
$; # A lone dollar?
=$"; # Pod?
$; # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print%; # No right operand for %?
------------------------------
Date: Wed, 25 Apr 2001 14:40:39 +0100
From: "Stuart Moore" <stumo@bigfoot.com>
Subject: Browsing Directories by CGI
Message-Id: <XsAF6.781$vJ5.150352@news2-win.server.ntlworld.com>
Is there a module that handles browsing directories (and if possible
uploading/downloading) through a CGI interface? My ISP insists I dial through
them to upload through FTP, this'd be a useful way of getting through that.
Stuart
------------------------------
Date: 25 Apr 2001 13:42:35 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Counting number of chars in a line (part of reading multiline CSV
Message-Id: <9c6k8b$s1s$1@mamenchi.zrz.TU-Berlin.DE>
According to Richard Lawrence <ralawrence@my-deja.com>:
> Hi all,
>
> I'm trying to read in and parse CSV files. I've used the solution
> suggested in the cookbook and it works well, apart from the fact that
> \n's in the fields cause the whole thing to break horribly.
Explicit linefeeds in CVS data looks like an umm... strange concept.
If at all possible, change the data format to standard comma-separated
fields. Even if this isn't possible, I would seriously consider
pre-processing the input data so that your program doesn't have to
contend against such nonsense.
> So I figured that if I could count the number of "'s in the line
> (ignoring the ""'s) then I could work out whether or not the line below
> needed to be concatenated with the current line.
>
> So I came up with this:
>
> $string = 0;
> while ($string =~ /"[^"]/g) { $count++ };
>
> which works pretty well, except that 'hello""there' incorrectly returns
> 1 because although it ignores the first ", it counts the second.
[snip more valiant attempts]
I think you will need lookaround to do this with a single regex.
A simple approach would be to count all double quotes in one step,
count the double quotes that come in pairs in another, and take
the difference:
my $count = ( $string =~ tr/"/"/) - 2*( $string =~ s/""/""/g);
Anno
------------------------------
Date: Wed, 25 Apr 2001 10:00:36 -0400
From: Richard Lawrence <ralawrence@mailandnews.co.uk>
Subject: RE: Counting number of chars in a line (part of reading multiline CSV
Message-Id: <3B2E5D62@MailAndNews.com>
>===== Original Message From anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
=====
>According to Richard Lawrence <ralawrence@my-deja.com>:
>> Hi all,
>>
>> I'm trying to read in and parse CSV files. I've used the solution
>> suggested in the cookbook and it works well, apart from the fact that
>> \n's in the fields cause the whole thing to break horribly.
>
>Explicit linefeeds in CVS data looks like an umm... strange concept.
>If at all possible, change the data format to standard comma-separated
>fields. Even if this isn't possible, I would seriously consider
>pre-processing the input data so that your program doesn't have to
>contend against such nonsense.
The CSV file is outputted from Microsoft Outlook Contacts and, as such, the
address lines are separated by newlines so you might have
Forename,Surname,Address,Telephone Number
Richard,Lawrence,10 Smithy Street\nSomewheresville\nEngland,+44123456789
Its definately Microsoft breaking CSV rules, but since it is something that
absolutely, definativily, positivily, must be supported - I have no choice
but
to code for it.
>I think you will need lookaround to do this with a single regex.
>A simple approach would be to count all double quotes in one step,
>count the double quotes that come in pairs in another, and take
>the difference:
>
> my $count = ( $string =~ tr/"/"/) - 2*( $string =~ s/""/""/g);
Thanks! I'll give it a go!
Rich
------------------------------------------------------------
Get your FREE web-based e-mail and newsgroup access at:
http://MailAndNews.com
Create a new mailbox, or access your existing IMAP4 or
POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------
------------------------------
Date: Wed, 25 Apr 2001 10:26:36 -0400
From: Richard Lawrence <ralawrence@mailandnews.co.uk>
Subject: RE: Counting number of chars in a line (part of reading multiline CSV
Message-Id: <3B2EB133@MailAndNews.com>
>===== Original Message From anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
=====
>According to Richard Lawrence <ralawrence@my-deja.com>:
>> Hi all,
>>
>> I'm trying to read in and parse CSV files. I've used the solution
>> suggested in the cookbook and it works well, apart from the fact that
>> \n's in the fields cause the whole thing to break horribly.
>
>Explicit linefeeds in CVS data looks like an umm... strange concept.
>If at all possible, change the data format to standard comma-separated
>fields. Even if this isn't possible, I would seriously consider
>pre-processing the input data so that your program doesn't have to
>contend against such nonsense.
The CSV file is outputted from Microsoft Outlook Contacts and, as such, the
address lines are separated by newlines so you might have
Forename,Surname,Address,Telephone Number
Richard,Lawrence,10 Smithy Street\nSomewheresville\nEngland,+44123456789
Its definately Microsoft breaking CSV rules, but since it is something that
absolutely, definativily, positivily, must be supported - I have no choice
but
to code for it.
>I think you will need lookaround to do this with a single regex.
>A simple approach would be to count all double quotes in one step,
>count the double quotes that come in pairs in another, and take
>the difference:
>
> my $count = ( $string =~ tr/"/"/) - 2*( $string =~ s/""/""/g);
Thanks! I'll give it a go!
Rich
------------------------------------------------------------
Get your FREE web-based e-mail and newsgroup access at:
http://MailAndNews.com
Create a new mailbox, or access your existing IMAP4 or
POP3 mailbox from anywhere with just a web browser.
------------------------------------------------------------
------------------------------
Date: Wed, 25 Apr 2001 03:46:46 -0500
From: kelli norman <kellikellin@netscape.net>
Subject: Re: DBM data stores
Message-Id: <3AE68EF6.538CA210@netscape.net>
mysql, which is free for unix(like) systems, also has 'lock
tables/unlock tables' to prevent other users from using the tables while
you're modifying them.
kelli
---
Eric Mosley wrote:
>
> Hi,
>
> We are looking at using a DBM store for our cgi routines on the web server.
> The max amount of data will be about 10,000 name-value pairs.
>
> But what I'm worried about is multiple instances of the perl cgi program all
> reading/writing to the same DBM file - is lockin inherently built into the
> DBM package or is there a work around?
>
> Thanks for the help!
>
> Eric
------------------------------
Date: Wed, 25 Apr 2001 17:01:31 +0900
From: lee changkun <lckun@informatik.uni-rostock.de>
Subject: Help for scrpit line..
Message-Id: <3AE6845A.36A08AB2@informatik.uni-rostock.de>
Hi all,
Can Anyone tell me what means this command line ?
I don't understand -M and 60/60/24.
I think -M is Age of file in days when script started. But what means
60/60/24??
if (-M "$file" > 60/60/24){
}
Thanks in advance,
tag
------------------------------
Date: 25 Apr 2001 11:04:57 -0400
From: Vinny Murphy <vmurphy@Cisco.Com>
Subject: Re: Help for scrpit line..
Message-Id: <m3eluhqaue.fsf@vpnrel.cisco.com>
lee changkun <lckun@informatik.uni-rostock.de> writes:
> Hi all,
>
>
> Can Anyone tell me what means this command line ?
>
> I don't understand -M and 60/60/24.
>
> I think -M is Age of file in days when script started. But what means
> 60/60/24??
>
> if (-M "$file" > 60/60/24){
>
> }
if the file has been modified more than an hour.
More info see:
perldoc perlvar
perldoc perlfunc ( look for stat )
--
Vinny
------------------------------
Date: 25 Apr 2001 13:05:47 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: How do I find the OS?
Message-Id: <slrn9edius.jr7.rgarciasuarez@rafael.kazibao.net>
Stuart Moore wrote in comp.lang.perl.misc:
} How can I most easily find the OS from within a Perl script?
By looking into the $^O variable. See the perlvar manpage.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 25 Apr 2001 08:40:57 -0500
From: Mr. SunRay <nospam@hotmail.com>
Subject: Re: How do I find the OS?
Message-Id: <KtAF6.273$Iy1.116734@news.uswest.net>
I wrote:
> How can I most easily find the OS from within a Perl script?
>
>
use English;
print $OSNAME;
------------------------------
Date: Wed, 25 Apr 2001 13:44:42 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: How do I find the OS?
Message-Id: <slrn9edkrj.us4.bernard.el-hagin@gdndev25.lido-tech>
On Wed, 25 Apr 2001 08:40:57 -0500, Mr. SunRay <nospam@hotmail.com> wrote:
>I wrote:
>
>> How can I most easily find the OS from within a Perl script?
>>
>>
>use English;
>print $OSNAME;
A quote from 'perldoc English':
BUGS
This module provokes sizeable inefficiencies for regular
expressions, due to unfortunate implementation details.
If performance matters, consider avoiding English.
Cheers,
Bernard
--
perl -e's;;s,,Just another Perl hacker,;and$\="\r"and
$$=q!print${"\x27"}!;$;=qq.$0..q.v..qq!al $$!;$;=~s-\---;
/^....*(?{$|=eval$;;select($Just,$another,$Perlhacker,0.1)}).{25}/x;'
------------------------------
Date: Wed, 25 Apr 2001 14:39:18 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: How do I find the OS?
Message-Id: <qkBF6.26199$Ce4.1899822@news1.rdc1.ct.home.com>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> According to Stuart Moore <stumo@bigfoot.com>:
>> How can I most easily find the OS from within a Perl script?
> $^O. See perldoc perlvar.
$^O is often insufficiently granular--it returns the same thing for
perl on Windows regardless of which version (9x, NT, 2K) you're running
on. This is unfortunate as the different versions have different
capabilities. The Config module would be a reasonable place to
go look for particular capabilities, but unless things have
changed that's not quite enough for windows either. (Though
it *is* enough to determine what perl can or can't do on other
platforms)
Dan
------------------------------
Date: 25 Apr 2001 13:14:55 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: How to copy an entire directory
Message-Id: <9c6ikf$q0b$3@mamenchi.zrz.TU-Berlin.DE>
According to Laszlo G. Szijarto <Laszlo.G.Szijarto@grc.nasa.gov>:
> I think the easiest way -- on a Unix (bash) system would be --
>
> $command = "cp -r [directory] [newdirectoryname]";
> system($command);
You neglected to quote some context:
> "Mike Hogan" <me@mikehogan.net> wrote:
>> Can somebody please tell me how to copy an entire directory in a portable
>> manner?
How is your solution portable?
A portable method can be cobbled together from the standard modules
File::Find and File::Copy.
Anno
------------------------------
Date: Wed, 25 Apr 2001 09:24:14 -0400
From: Young Chi-Yeung Fan <yf32@cornell.edu>
Subject: Looking at HTTP message
Message-Id: <3AE6CFFE.D90B11F@cornell.edu>
Is it possible from Perl to look at the HTTP message sent to a script?
If so, how can I do it?
Thanks!
e.g.:
POST /MessageReceiver.cgi HTTP/1.0
Host: www.SomeHost.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 105
XML=%3C?xml%20version%3D%221.0%22%20encoding%3D%22utf-8%22?%3E%0A%3Cdoc%3Ehello%20world%3E%3C/doc%3E%0A
------------------------------
Date: 25 Apr 2001 13:38:27 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Looking at HTTP message
Message-Id: <slrn9edks4.jv3.rgarciasuarez@rafael.kazibao.net>
Young Chi-Yeung Fan wrote in comp.lang.perl.misc:
} Is it possible from Perl to look at the HTTP message sent to a script?
} If so, how can I do it?
If you are talking about a CGI script, and if you want the complete
request (headers + content) as received by the web server, the answer
to your question is no. And this is not Perl-related.
However, most parts of the request are available through the common
gateway interface, also known as 'CGI'. And in this case, the answer is
probably CGI.pm.
--
Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: Wed, 25 Apr 2001 16:36:08 +0200
From: "Jonas Nilsson" <jonni@ifm.liu.se>
Subject: Re: Lvalue
Message-Id: <9c6nch$sdp$1@newsy.ifm.liu.se>
"Tad McClellan" <tadmc@augustmail.com> wrote:
> >I guess you can define this function in terms of doing an eval() and trap
> >the error
>
>
> That seemed to be the consensus.
>
>
> >but that appears to me to be a very costly way of checking
> >something that should be very quick and easy check so I am hoping there's
a
> >better way.
>
>
> We didn't find one...
Isn't there any way to check the pointer-counter for $_ ? If there is more
than one pointer to the value of $_ it should be an L-value, shouldn't it?
/jN
--
_______________________________
Jonas Nilsson
------------------------------
Date: 25 Apr 2001 14:02:04 GMT
From: dfccxl1@amps001.verizon.com (Chuck Lucas)
Subject: Need help installing forum on server
Message-Id: <9c6lcs$8d4$1@news.gte.com>
My apologies if this message isn't proper...
Looking for someone to install forum software on a
web site. Installation will entail modifying web pages
to include forum link, and configuring forum software.
Will need HTML and perl skills.
I am not the proprieter...only the messenger.
Please contact directly (via e-mail ONLY) if interested,
and I will fill you in on details and proprieter's e-mail
address (to discuss payment :-).
Thank you for your time...sorry for the interruption.
Chuck
------------------------------
Date: Wed, 25 Apr 2001 08:59:14 -0500
From: Dan Harding <dharding@uiuc.edu>
Subject: Newbie GD question
Message-Id: <3AE6D832.C0055E1D@uiuc.edu>
I'm having (yet another) mental block.
I'm reading an image in via the newFromJpeg() function (I'd much
rather use newFromPng() but it causes PERL.exe to crash horribly,
and I've run out of ideas on that front, so I'm making do with JPEG).
Unfortunately, when an image is imported as JPEG, the color palette
is full. I wish to use several colors not already existing in the
palette, which means I need to deallocate existing colors so I can
add the new ones to the palette.
The problem I'm having is when I deallocate a color and add a new
one, whatever pixels in the image were the old color now become the
new color, in addition to whatever drawing/text labeling/etc. I'm
actually laying down.
Conceivably then, what I need to do is select a color index, find
all pixels in the image that are that index, change all those pixels
to the index of the closest color still remaining in the palette,
and *then* deallocate the index and reallocate the new color.
Is there a way to do this simply globally, or must one iterate over
every pixel of the image? I kept looking through the GD documentation
for something along the lines of a ReplaceColor(x,y) function which
would take all pixels in the image with index x and make them color
index y (thus freeing up x for deallocation).
My apologies if this seems a rudimentary question, but I've not
found any good examples of GD in action to peruse and glean/thief/
learn ideas from. :)
Thanks in advance,
-Dan
------------------------------
Date: Wed, 25 Apr 2001 07:48:56 -0700
From: Martin Djernaes <martin@djernaes.net>
Subject: Read text files of different format
Message-Id: <3AE6E3D8.6C68A4EE@djernaes.net>
Hi,
I have been looking for a way to read text files (eith perl on a unix
platform) which could be in eighter dos (\r\n), unix (\n) or mac (\r)
format. The best would be if a mix would be alowed, but also a way to
read the file with a consistent line termination would be fine.
Currently I do:
open (AFILE, "$myfile") || die("Can't open file '$myfile': $!");
binmode(AFILE);
@lines = <AFILE>;
close(AFILE);
my $my_lines = join(/\n/,@lines);
$my_lines =~ s/\r\n/\n/g;
$my_lines =~ s/\r/\n/g;
@lines = split(/\n/,$my_lines);
This is now very efficient, when talking about +500K files.
Anyone who have a better idea?
Thanks in advange.
Martin
------------------------------
Date: Wed, 25 Apr 2001 14:33:25 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: regexp matching with optional part
Message-Id: <tedo1llrhkg136@corp.supernews.com>
In article <slrn9ec8q6.3sc.abigail@tsathoggua.rlyeh.net>,
Abigail <abigail@foad.org> wrote:
: That apple rejects 'x-x'.
Trivially fixed. Thanks for pointing out the omission.
Greg
--
Any sufficiently complicated C or Fortran program contains an ad hoc
informally-specified bug-ridden slow implementation of half of Common Lisp.
-- Philip Greenspun
------------------------------
Date: Wed, 25 Apr 2001 14:13:45 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Regexp Question
Message-Id: <slrn9edmsp.r6k.abigail@tsathoggua.rlyeh.net>
Peter White (hpya78@postoffice.pacbell.net) wrote on MMDCCXCIV September
MCMXCIII in <URL:news:3AE6805A.5361A39A@postoffice.pacbell.net>:
|| Hi,
||
|| I have a file like:
||
|| File:
|| 10 20 30 40
|| 100 20 50 66
|| 200 300 400 500
||
|| How to write a Regexp to get the record between 0 and 100?
Which record do you want? Of the 12 numbers, 7 are between 0 and 100.
Could you define "record"? Is it an entire line? A number? A digit?
With, or without the white space?
Abigail
------------------------------
Date: Wed, 25 Apr 2001 14:36:51 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: So what do YOU use Perl for?
Message-Id: <tedo83kg616877@corp.supernews.com>
In article <Xns908AD0E0378F1echangnetstormnet@207.106.92.86>,
E.Chang <echang@netstorm.net> wrote:
: [...] (Oh, and a hint: .html is preferred over .htm as an extension
: for web documents - unless you're running your server on a Windows 3.x
: machine)
Think again. There's no necessary mapping between URIs and filenames.
ObPerl: with Apache and mod_perl, it's trivial to create all sorts of
cool mappings. grep /Lincoln Stein/, @WWW;
Greg
--
No one now dies of fatal truths: there are too many antidotes to them.
-- Nietzsche
------------------------------
Date: Wed, 25 Apr 2001 14:40:59 -0000
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: total newbie
Message-Id: <tedofrsqe3red3@corp.supernews.com>
In article <3ae63cf6.5374905@news-server>,
Gil G. <gil@nospam-keskydee.com> wrote:
: There is no compiler, but an interpreter...
Gee, then what's that perly.y business in the perl source?
Greg
--
Isn't it a bit unnerving that doctors call what they do "practice"?
-- George Carlin
------------------------------
Date: Wed, 25 Apr 2001 13:09:56 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Unix Commands from PERL
Message-Id: <71jdet0jl894j2kt98hnvsrk740p2219v2@4ax.com>
Bob Smith wrote:
>I was wondering if there is any way that I can call unix commands from a
>perl program
>so that I can access all the return values from the command - porblem is
>that certain
>commands return a lot of data (i.e. vmstat)
There are a lot more options under Unix than uder other OS'es. Portable
options are backticks (`ls *.txt`), system(), exec() (which doesn't
return). Unix-specific options include opening pipes to/from your
external program. See perldoc perlipc under "open".
--
Bart.
------------------------------
Date: 25 Apr 2001 14:34:59 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Unix Commands from PERL
Message-Id: <slrn9edo4j.buk.vek@pharmnl.ohout.pharmapartners.nl>
On Wed, 25 Apr 2001 13:09:56 GMT, Bart Lateur <bart.lateur@skynet.be> wrote:
>Bob Smith wrote:
>
>>I was wondering if there is any way that I can call unix commands from a
>>perl program
>>so that I can access all the return values from the command - porblem is
>>that certain
>>commands return a lot of data (i.e. vmstat)
>
>There are a lot more options under Unix than uder other OS'es. Portable
>options are backticks (`ls *.txt`), system(), exec() (which doesn't
>return). Unix-specific options include opening pipes to/from your
>external program. See perldoc perlipc under "open".
>
open PIPE, "program|";
works on windows9x as well.
Villy
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 761
**************************************