[23466] in Perl-Users-Digest
Perl-Users Digest, Issue: 5680 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 19 09:05:58 2003
Date: Sun, 19 Oct 2003 06:05:10 -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 Sun, 19 Oct 2003 Volume: 10 Number: 5680
Today's topics:
Any thought on "Perl Database" based on "Tie:File"? <ir@labranche.com>
Re: Any thought on "Perl Database" based on "Tie:File"? <nospam@bigpond.com>
Re: Any thought on "Perl Database" based on "Tie:File"? <tassilo.parseval@rwth-aachen.de>
Re: Any thought on "Perl Database" based on "Tie:File"? <r_reidy@comcast.net>
character mapping functions and UNICODE : remove accent <avlula@hotmail.com>
Finding all used fileno's ? <darnold@presicient.com>
Re: finding text-segment in a HTTP::Element tree <nan@voulauépa.com>
Re: Hair-pulling Switch bug ? <grazz@pobox.com>
Help me with is code <ir@labranche.com>
Re: How can i write the values of a form through a cgi <tore@aursand.no>
How do I do this without database? <ir@labranche.com>
Re: How do I do this without database? <ir@labranche.com>
Re: How Do I Use Proxy in Net:HTTP? <ir@labranche.com>
Re: How Do I Use Proxy in Net:HTTP? <bart.lateur@pandora.be>
Re: how to keep database connection persistent <bjoern_p1@gmx.net>
How to use max_siz in Net:Http <ir@labranche.com>
Re: how would i handle this? <xemoth@not.here.com>
Re: how would i handle this? <noreply@gunnar.cc>
HTML whitespace/commnets cruncher <none@none.com>
Re: HTML whitespace/commnets cruncher <kuujinbo@hotmail.com>
Manipulation binary files <chris@nospam.dustbubble.com>
Re: Perl 'system' Creates Program That Dies When First (Christopher M. Lusardi)
Re: Perl 'system' Creates Program That Dies When First <flavell@ph.gla.ac.uk>
Re: Perl security guru needed for a quick, 2 hr, job. (RMallonday)
Re: Use perl in apache without #!/path/to/perl <ron@savage.net.au>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 19 Oct 2003 05:03:05 GMT
From: "Public Interest" <ir@labranche.com>
Subject: Any thought on "Perl Database" based on "Tie:File"?
Message-Id: <dWokb.6707$Ec1.611722@bgtnsc05-news.ops.worldnet.att.net>
Here is what my friend told me: Database sucks and MySQL too. Try program
without using database. Database is a file system. It is slow, take more
space...
But still there is many things I can not do with just simple text file, such
as updating a record....
I just found Tie:File which added many features to text files. Here is my
feature request to the owner of Perl: Add Perl Database, or at least
something called Perl Table
For instance in file:
symbol|price on day1|volume on day1|price on day2|price on day2|....
IBM|98.02|203092|97.01|1212300
SUNW|3.45|1112232|3.72|1212219
Let me select where symbel=IBM, or let me update price on day1 where
symbol=IBM to 99.08....
And things like that. I don't know much about SQL, so my SQl syntax maybe
wrong.
Any thought on my idea?
------------------------------
Date: Sun, 19 Oct 2003 17:33:29 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Any thought on "Perl Database" based on "Tie:File"?
Message-Id: <3121765.lQV2OdsWez@gregs-web-hosting-and-pickle-farming>
It was a dark and stormy night, and Public Interest managed to scribble:
> Here is what my friend told me: Database sucks and MySQL too. Try program
> without using database. Database is a file system. It is slow, take more
> space...
And he graduated in software engineering from which university?
I regularly get reads of 5000 rows/sec thru mysql.
See http://www.w3schools.com/sql/default.asp
gtoomey
------------------------------
Date: 19 Oct 2003 07:41:24 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Any thought on "Perl Database" based on "Tie:File"?
Message-Id: <bmtf74$sav$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Public Interest:
> Here is what my friend told me: Database sucks and MySQL too. Try program
> without using database. Database is a file system. It is slow, take more
> space...
In its generity, this statement is wrong. If (SQL) databases were too
slow, major websides such as those of amazon or Ebay would have to be
too slow, too. Databases often impose a certain overhead, like when you
set up a connection to one. Proper databases however are optimized to
deal efficiently with large sets of data.
> But still there is many things I can not do with just simple text file, such
> as updating a record....
Indeed. And if you implemented such a mechanism, it'd very likely be
much slower than a good database.
> I just found Tie:File which added many features to text files. Here is my
> feature request to the owner of Perl: Add Perl Database, or at least
> something called Perl Table
Owner of Perl? I'd like to meet this person. ;-)
Anyway, Tie::File is the wrong tool for that. It's an ingenious module
nonetheless, letting you do hard things in a very easy way. But it's slow,
very slow compared to a real database server.
> For instance in file:
> symbol|price on day1|volume on day1|price on day2|price on day2|....
> IBM|98.02|203092|97.01|1212300
> SUNW|3.45|1112232|3.72|1212219
>
> Let me select where symbel=IBM, or let me update price on day1 where
> symbol=IBM to 99.08....
>
> And things like that. I don't know much about SQL, so my SQl syntax maybe
> wrong.
A database has at the very least two components: the backend that
manages the data and the interface to access those data. SQL is the
interface. If you have a look at CPAN modules dealing with SQL, you'll
notice that a lot of them don't interface with a real database server at
all. For instance DBD::Sprite: it uses flat files as the backend so a
real database system is never involved.
I didn't look too closely, but I bet there's also a backend that keeps
the data in your computer's RAM but lets you use the DBI module to
access it with proper SQL statements. If such a backend was well written
(preferably in C and not Perl), it could result in very fast database
access. But it's, quite naturally, not suitable for large data sets. It
might however be what you need since a real database is indeed overkill
when you only have very data to deal with.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Sun, 19 Oct 2003 06:06:34 -0600
From: Ron Reidy <r_reidy@comcast.net>
Subject: Re: Any thought on "Perl Database" based on "Tie:File"?
Message-Id: <3F927E4A.9080607@comcast.net>
See below ...
Public Interest wrote:
> Here is what my friend told me: Database sucks and MySQL too. Try program
> without using database. Database is a file system. It is slow, take more
> space...
He/she is wrong! A DB is not a file system. They are not slow if your
data model is designed correctly and your throughput is considered.
>
> But still there is many things I can not do with just simple text file, such
> as updating a record....
>
> I just found Tie:File which added many features to text files. Here is my
> feature request to the owner of Perl: Add Perl Database, or at least
> something called Perl Table
No one owns Perl. Furthermore, why add a RDBMS into Perl when there are
modules that allow RDBMS access?
>
> For instance in file:
> symbol|price on day1|volume on day1|price on day2|price on day2|....
> IBM|98.02|203092|97.01|1212300
> SUNW|3.45|1112232|3.72|1212219
>
> Let me select where symbel=IBM, or let me update price on day1 where
> symbol=IBM to 99.08....
>
> And things like that. I don't know much about SQL, so my SQl syntax maybe
> wrong.
Get a book on SQL (MySQL would most likely work for you) and you should
be up to seped soon.
>
> Any thought on my idea?
Yes. Go back to the drawing board.
>
>
--
Ron Reidy
Oracle DBA
------------------------------
Date: Sun, 19 Oct 2003 09:45:57 GMT
From: "An. Valula" <avlula@hotmail.com>
Subject: character mapping functions and UNICODE : remove accents, case, etc
Message-Id: <p3tkb.310544$lh.71552685@amsnews02.chello.com>
Hi,
does anyone out there know about perl capabilities to convert rich text,
such as "étrangères" to "etrangere" (remove accents)?
Of course, tr/éè/ee/ would do, but I look for sth better: you do not
tr/a-z/A-Z/ for uc(), do you?
regards
------------------------------
Date: Sun, 19 Oct 2003 01:14:26 GMT
From: "Dean Arnold" <darnold@presicient.com>
Subject: Finding all used fileno's ?
Message-Id: <Szlkb.1630$rd1.1588@newssvr29.news.prodigy.com>
I've got an app that calls an external
3rd party C lib that opens sockets, but doesn't expose the sockets
directly outside of the library. I want to use the fileno's
of those sockets in a Perl select(read,write,error,timeout) call.
so I need to discover the fileno's of the sockets.
Q: will something like the following do what I need
(esp. on both Win32 and *nix) ? The upper fileno limit
is arbitrary, and can probably be tuned as needed.
@fdary = ();
foreach (0..23) {
$fdary[$_] = 1, next
unless open FH, "<&$_";
close FH;
}
foreach (0..$#fdary) {
print "$_ is available\n"
if defined($fdary[$_]);
}
The idea would be to scan once before
calling the external lib to open a socket,
then scan again, skipping the entries we know are
already open. The difference between
pre- and post- sets of dup'able handles is
assumed to be the fileno's of the new sockets.
It seems to work for files openned via Perl, but are
the fileno's generated via Perl identical to the underlying OS's
file descriptors ? esp. for Win32 ?
Is there a way to do this with a zero-timeout select() or poll()
(ie, set the bitmask to all fileno's, then scan for any fileno's
which report errors ?)
Is there a simpler solution (other than lsof, which
AFAIK doesn't exist in Win32) ? Google didn't provide
any promising results.
TIA,
Dean Arnold
Presicient Corp.
www.presicient.com
------------------------------
Date: Sat, 18 Oct 2003 15:23:20 +0200
From: "Arthur B." <nan@voulauépa.com>
Subject: Re: finding text-segment in a HTTP::Element tree
Message-Id: <bms4ac$qqr$1@news.polytechnique.fr>
ko wrote:
> I could be wrong, but I don't think there is a HTTP::Element module on
> CPAN (at least it doesn't show up in the first 100 doing a search).
HTML Element, my mistake
> HTML::Element has a look_down method. Is this what you are using?
yes
> What exactly are you trying to do,
See my post : call a sub for each text-segment, taking the segment
as a parameter. See HTML::Element for a definition of text-segment
> and what code have you tried so far?
Nothing, I can't figure how to do it
>
> keith
------------------------------
Date: Sun, 19 Oct 2003 02:10:28 GMT
From: Steve Grazzini <grazz@pobox.com>
Subject: Re: Hair-pulling Switch bug ?
Message-Id: <oomkb.2970$PZ1.1874@nwrdny03.gnilink.net>
Willem <grootw@cs.utwente.nl> wrote:
> ==================================
> use IO::Socket;
> use Switch;
>
> $handle = IO::Socket::INET->new("smtp.utwente.nl:25")
> or die "can't connect: $!";
>
> while (defined ($line = <$handle>)) {
> print STDOUT $line;
> last;
> }
>
> # switch
> ==================================
> This spits out:
> IO::Socket::INET=GLOB(0x8341060)
I think it has to be a bug in Switch. The line with "<$handle>" is
getting source-filter-borked into "< $handle>", which parses as a glob()
instead of a readline().
--
Steve
------------------------------
Date: Sun, 19 Oct 2003 06:01:30 GMT
From: "Public Interest" <ir@labranche.com>
Subject: Help me with is code
Message-Id: <_Mpkb.6746$Ec1.615125@bgtnsc05-news.ops.worldnet.att.net>
i am trying to use proxy 64.161.246.100:8080
original code without proxy:
use Net::HTTP;
#
my $s = Net::HTTP->new(Host => 'quote.yahoo.com') || die $@;
$s->write_request(GET => 'http://quote.yahoo.com', 'User-Agent' =>
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)' );
my($code, $mess, %h) = $s->read_response_headers;
print %h;
$location=$h{'Location'} ;
print $location;
it find that the location is http://finance.yahoo.com/?
now use it with proxy:
use Net::HTTP;
#
my $s = Net::HTTP->new(Host => '64.161.246.100:8080') || die $@;
$s->write_request(GET => 'http://quote.yahoo.com', 'User-Agent' =>
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)' );
my($code, $mess, %h) = $s->read_response_headers;
print %h;
$location=$h{'Location'} ;
print $location;
in the header, it shows no location
I tested the proxy in IE, it works fine when I typed http://quote.yahoo.com
and it forwards me to http://finance.yahoo.com/? So that means the proxy is
set up perfectly handling header Location. One other strainge thing is when
I try to use the script to hit my own server, my server log file does not
even show the hit which requests the redirect header.
------------------------------
Date: Sun, 19 Oct 2003 03:10:56 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: How can i write the values of a form through a cgi script in a txt file.
Message-Id: <pan.2003.10.18.23.02.05.957072@aursand.no>
On Fri, 17 Oct 2003 12:01:16 -0700, JR wrote:
> I tried your code but i get the follow error
Please post the complete code.
--
Tore Aursand <tore@aursand.no>
------------------------------
Date: Sun, 19 Oct 2003 04:11:32 GMT
From: "Public Interest" <ir@labranche.com>
Subject: How do I do this without database?
Message-Id: <U9okb.6670$Ec1.608121@bgtnsc05-news.ops.worldnet.att.net>
I am trying to scan stock price and volumes on a watch list. I have 1100
stocks on the list and I want to save them in a single file then use excel.
Here is the format I want:
symbol|price on day1|volume on day1|price on day2|price on day2|....
IBM|98.02|203092|97.01|1212300
SUNW|3.45|1112232|3.72|1212219
I will scan the price and update add the new price and volume to the end of
the line of each stock. The only thing I came up is to read the whole file
in one array and add things to each element of the array then rewrite the
whole array to the file. I know it is kind of breaking the RULE of not
reading the whole file but only line by line. And it takes me 1 hours for
scan all the data due to my dial-up connections. So I want to have something
that I can start and pause then restart.But if I only read line by line, how
do I append only to the end of the line not to the end of the file? It came
back to the old question which is how to delete/modify lines in a text file.
I am using active perl on windows.
------------------------------
Date: Sun, 19 Oct 2003 04:56:40 GMT
From: "Public Interest" <ir@labranche.com>
Subject: Re: How do I do this without database?
Message-Id: <cQokb.6701$Ec1.610254@bgtnsc05-news.ops.worldnet.att.net>
Ok, I did not know that Tie:File is now in place starting with 5.8.0
Tie:File super
------------------------------
Date: Sun, 19 Oct 2003 04:51:53 GMT
From: "Public Interest" <ir@labranche.com>
Subject: Re: How Do I Use Proxy in Net:HTTP?
Message-Id: <JLokb.6700$Ec1.611067@bgtnsc05-news.ops.worldnet.att.net>
Please give me a line or two showing how to use proxy..
In UserAgent it is:
$ua->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/');
Can do use the same line in Net:Http? I don' know how use use 2616.
<gisle@activestate.com> ????
news:m3ad82rvjh.fsf@eik.i-did-not-set--mail-host-address--so-shoot-me...
> "Public Interest" <ir@labranche.com> writes:
>
> > Can anyone tell me how the proxy is implemented in LWP:UserAgent? I have
to
> > use a proxy in Net:HTTP, but proxy is not supported in it.
>
> Net::HTTP support proxies just fine. RFC 2616 explains how to do it.
> You basically just provide full absolute URLs with the requests you
> send.
>
> --
> Gisle Aas
------------------------------
Date: Sun, 19 Oct 2003 11:42:41 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: How Do I Use Proxy in Net:HTTP?
Message-Id: <pct4pvk5144ohniklsfgprepluihf9rd0a@4ax.com>
Public Interest wrote:
>Please give me a line or two showing how to use proxy..
>
>In UserAgent it is:
>$ua->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/');
>
>Can do use the same line in Net:Http? I don' know how use use 2616.
No. As Gisle Aas wrote, you have to do a low level connection yourself.
Thank goodness, the difference between a direct connection and a
connection via proxy is minimal. The gist is:
For a normal connection, you
- connect to a host/port, and
- request for a URL that looks like an absolute Unix path. (= relative
to the domain root)
For a proxy connection, you
- connect to the proxy, and
- request for an absolute URL, including protocol ("http"), domain and
optionally, port.
Here's an example modified from the Synopsis of Net::Http, which
requests a page on a port different from the default for http, 80:
use Net::HTTP;
my $s = Net::HTTP->new(Host => "modperl.com", PeerPort => 9000)
or die $@;
$s->write_request(GET => "/perl_networking/errata.html");
my($code, $mess, %h) = $s->read_response_headers;
print "Response code: $code ($mess)\n";
use Data::Dumper;
print Data::Dumper->Dump([\%h], ['*headers']);
print "\n";
{
my $n = $s->read_entity_body(my $buf, 1024);
die "read failed: $!" unless defined $n;
print $buf;
redo if $n;
}
Here is it again, for another URL, and modified to connect via the proxy
of my ISP (<http://proxy.pandora.be:8080>):
use Net::HTTP;
my $s = Net::HTTP->new(Host => "httpd.apache.org",
PeerAddr => 'proxy.pandora.be', PeerPort => 8080) or die $@;
$s->write_request(GET =>
"http://httpd.apache.org/docs/misc/FAQ.html");
my($code, $mess, %h) = $s->read_response_headers;
print "Response code: $code ($mess)\n";
use Data::Dumper;
print Data::Dumper->Dump([\%h], ['*headers']);
print "\n";
{
my $n = $s->read_entity_body(my $buf, 1024);
die "read failed: $!" unless defined $n;
print $buf;
redo if $n;
}
IMO the code to retrieve data via a proxy is actually simpler than for a
normal connection, because (almost) everything but the URL for the GET
is constant.
n.b. I think the Host property is mainly important if you encounter name
based virtual hosts, otherwise you could get pages from the wrong
domain.
--
Bart.
------------------------------
Date: Sun, 19 Oct 2003 14:13:45 +0200
From: Bjoern <bjoern_p1@gmx.net>
Subject: Re: how to keep database connection persistent
Message-Id: <bmtv1v$q3jfc$1@ID-142197.news.uni-berlin.de>
James Q.L wrote:
> "Eric J. Roode" <REMOVEsdnCAPS@comcast.net> wrote in message
> news:Xns9418B40397C05sdn.comcast@216.196.97.136...
>
>>-----BEGIN xxx SIGNED MESSAGE-----
>>Hash: SHA1
>>
>>"James Q.L" <dragon@china.com> wrote in
>>news:szekb.8193$Z_2.582801@news20.bellglobal.com:
>>
>>
>>>Hi,
>>>
>>>i have a non-cgi script being called by users in command line. this
>>>script query database and return data.
>>>as this script is called frequently, i would like to keep a database
>>>connection so it won't initiate a new db connection.
>>>
>>>how do i do that ?
[...]
> i found sql relay does that. will give it a go later.
> http://sqlrelay.sourceforge.net/
Not enough time to read through that page, but I'm really surprised -
isn't it the nature of a command line script that it stops execution
after it's finished? So obviously it can't keep a connection around in
memory... Of course you could have a sort of 'Connection Server' that
keeps pooled connections to the database, and the script connects to
that server instead of the database. But why should that be more
efficient than connecting to the database directly?
Bjoern
--
Let's not weep for their evil deeds,
but for their lack of imagination
(Nick Cave)
------------------------------
Date: Sun, 19 Oct 2003 05:18:53 GMT
From: "Public Interest" <ir@labranche.com>
Subject: How to use max_siz in Net:Http
Message-Id: <19pkb.6722$Ec1.613598@bgtnsc05-news.ops.worldnet.att.net>
max_size is included in LWP:UserAgent?
How do I use max_size or similar in Net:Http?
------------------------------
Date: Sun, 19 Oct 2003 10:17:45 +0000
From: Owen <xemoth@not.here.com>
Subject: Re: how would i handle this?
Message-Id: <Pine.NEB.4.58.0310191016190.3375@sdf.lonestar.org>
On Sat, 18 Oct 2003, The Mosquito ScriptKiddiot wrote:
>
> so instead of having to build the hash table everytime the script is run in a
> session, i would like to make it so that in a given session, the hash table
> gets constructed only the first time around and then stays in memory for later
> use in that session, because that hash table info doesnt change at all
>
> how would i go abt achieving this? any special modules needed?
use Storable;
--
xemoth
@
sdf.lonestar.org
------------------------------
Date: Sun, 19 Oct 2003 12:44:39 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: how would i handle this?
Message-Id: <bmtq27$qvu90$1@ID-184292.news.uni-berlin.de>
Owen wrote:
> On Sat, 18 Oct 2003, The Mosquito ScriptKiddiot wrote:
>> so instead of having to build the hash table everytime the script
>> is run in a session, i would like to make it so that in a given
>> session, the hash table gets constructed only the first time
>> around and then stays in memory for later use in that session,
>> because that hash table info doesnt change at all
>>
>> how would i go abt achieving this? any special modules needed?
>
> use Storable;
Wouldn't the use of Storable mean that the hash would need to be built
every time, i.e. just what OP is striving to avoid?
Provided that it's a simple one-dimensional hash, my first thought is
to store it in a DBM file and access the data via a tied hash.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sun, 19 Oct 2003 11:35:34 +0100
From: Garry Heaton <none@none.com>
Subject: HTML whitespace/commnets cruncher
Message-Id: <zOtkb.12373$kA.3236929@wards.force9.net>
Can anyone recommend a perl script for crunching HTML whitespace and
comments? I wish to make duplicates of HTML files for uploading.
Garry Heaton
------------------------------
Date: Sun, 19 Oct 2003 20:25:58 +0900
From: ko <kuujinbo@hotmail.com>
Subject: Re: HTML whitespace/commnets cruncher
Message-Id: <bmtsgk$ho1$1@pin3.tky.plala.or.jp>
Garry Heaton wrote:
> Can anyone recommend a perl script for crunching HTML whitespace and
> comments? I wish to make duplicates of HTML files for uploading.
>
> Garry Heaton
>
Use one of the HTML parsing modules. For example:
http://search.cpan.org/~gaas/HTML-Parser-3.33/
Download and unpack the distribution, and check out the example scripts
in the 'eg' directory.
HTH - keith
------------------------------
Date: Sun, 19 Oct 2003 13:56:35 +0100
From: "Chris" <chris@nospam.dustbubble.com>
Subject: Manipulation binary files
Message-Id: <cSvkb.498$jk1.619339@newsfep1-win.server.ntli.net>
Dear All,
I'm trying to use perl in a way I am not usd to, and coming unstuck :-(
I have a binary file of unsigned byte values, and I wish to convert these
into a .wav file, so that I can use the soundcard DAC to generate the
waveform the binary file describes (cool huh? Cheap signal generator :-)
The problem is that the wav file format needs to have all all sorts of stuff
munged into the header, including strings "RIFF" "WAVE" and "fmt " and
values that describe other paramters. SOme of these data types are 32 bit,
some are 16 some are 8.
In perl how do i ...
a) write to a file in binary mode. I have tried using binmode(FH) before the
writing beging, but it seems to make little difference
b) write strings in binary mode. I dont really have to do write 0x52 0x49
0x46 0x46 if there is a way to write "RIFF" and have perl do the donkey work
c) Declare the widths of my variables. I need to be able to assign a
variable with a value, and output all 4 bytes of that value to the file in
binary mode.
I'm guessing that all this is very easy, and I'm just looking in the wrong
place :-(
Cheers
Chris
------------------------------
Date: 19 Oct 2003 03:40:29 -0700
From: clusardi2k@aol.com (Christopher M. Lusardi)
Subject: Re: Perl 'system' Creates Program That Dies When First C Program Dies
Message-Id: <d5cfdc47.0310190240.6afae540@posting.google.com>
My operating system is Red Hat Linux.
Bob Walton <invalid-email@rochester.rr.com> wrote in message news:<3F9175E7.2010601@rochester.rr.com>...
> Christopher M. Lusardi wrote:
>
> > Hello,
> >
> > What are some simple ways to run a perl script from an initial c program
> > which starts another C program that stays around after the first program goes
> > away? Perl starts the second C program.
> >
> > I've tried using "system ('executable'), but when the first program is
> > stopped the second stops without my intervention. What I want to be able to do
> > is run my first program that starts the perl script which starts another
> > program that stays around after the first program ends its execution.
> >
> >
> > Thank you,
> > Christopher Lusardi
> >
>
> Your question isn't really a Perl question, but rather an OS question --
> the answer will be the same if it were another language that is kicking
> off your executables -- hence it is off-topic here. And the answer will
> depend on your OS. What is it?
------------------------------
Date: Sun, 19 Oct 2003 12:53:53 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Perl 'system' Creates Program That Dies When First C Program Dies
Message-Id: <Pine.LNX.4.53.0310191253230.6480@ppepc56.ph.gla.ac.uk>
On Sun, 19 Oct 2003, Christopher M. Lusardi blurted out:
> My operating system is Red Hat Linux.
Your posting style is TOFU.
------------------------------
Date: 19 Oct 2003 01:37:56 GMT
From: rmallonday@aol.com (RMallonday)
Subject: Re: Perl security guru needed for a quick, 2 hr, job.
Message-Id: <20031018213756.15443.00001346@mb-m28.aol.com>
Thanks Tad! WSP sounds like a very interesting avenue!
------------------------------
Date: Sun, 19 Oct 2003 13:02:42 +1000
From: Ron Savage <ron@savage.net.au>
Subject: Re: Use perl in apache without #!/path/to/perl
Message-Id: <2003101913242.913802@ron>
On Sat, 18 Oct 2003 23:32:11 +1000, stud1174@di.uoa.gr wrote:
Hi Kostas
>=A0I want to set up apache to use the perl interpreter automatically
>=A0for all .pl files, without the need to have a #!/path/to/perl
>=A0directive in each file. This is beacause I want to use a winows
>=A0machine to test some scripts created in linux, thus havind #!
>=A0/usr/bin/perl instead of #!c:\Perl\bin\perl.exe. I tried the
>=A0following in httpd.conf
You're doing it the hard way.
Under Windows, create c:\usr, and inside it c:\usr\bin.
Then copy perl.exe from c:\perl\bin to c:\usr\bin.
Now all your scripts - on both platforms - can start with
#!/usr/bin/perl
That's what I've been doing for a 3 or 4 years. And many thanx (again) to=
the guy who pointed it out to me!
You don't need to patch httpd.conf.
--
Cheers
Ron Savage, ron@savage.net.au on 19/10/2003
http://savage.net.au/index.html
------------------------------
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 5680
***************************************