[17946] in Perl-Users-Digest
Perl-Users Digest, Issue: 106 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jan 20 14:05:31 2001
Date: Sat, 20 Jan 2001 11:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <980017507-v10-i106@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 20 Jan 2001 Volume: 10 Number: 106
Today's topics:
Re: $ problem <marekpow@yahoo.com>
Re: CGI Problem <artd@artd3.com>
Re: Deleting a line from file <mtaylorlrim@my-deja.com>
Re: Deleting a line from file (Tad McClellan)
Re: Deleting a line from file djin1@my-deja.com
Re: Deleting a line from file <jamie.oshaughnessy@ntlworld.com>
Re: Deleting a line from file <jamie.oshaughnessy@ntlworld.com>
Directory Last Modified (BUCK NAKED1)
Re: FAQ 9.15: How do I decode a CGI form? <godzilla@stomp.stomp.tokyo>
LDAP & SSL in Perl utsav_ratti@my-deja.com
localtim() problem (Stan Brown)
Re: localtim() problem (Stan Brown)
Re: Multiprocess or multithreaded??? <davesisk@ipass.net>
Newbie question <ewsr1@home.com>
percentages, how? <snef@soneramail.nl>
Re: Perl - Bytecode, Compile to C, Perl2EXE (Cameron Laird)
Re: Perl - Bytecode, Compile to C, Perl2EXE (Tad McClellan)
Re: Perl - Bytecode, Compile to C, Perl2EXE (Tad McClellan)
Re: Perl - Bytecode, Compile to C, Perl2EXE (Tad McClellan)
Re: Powerful Technique 3606 <bart.lateur@skynet.be>
Re: regular expression question. pls help (Ben Okopnik)
Re: Spawning Parallel Processes <davesisk@ipass.net>
Re: Suppressing stderr on `` commands (Ben Okopnik)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 20 Jan 2001 16:29:27 +0000 (UTC)
From: "MaxyM" <marekpow@yahoo.com>
Subject: Re: $ problem
Message-Id: <01c082fe$28747a00$37811dc3@default>
Tnx to All!
------------------------------
Date: Sat, 20 Jan 2001 10:18:41 -0500
From: "Art" <artd@artd3.com>
Subject: Re: CGI Problem
Message-Id: <t6jb31i40sc671@corp.supernews.com>
See below...
"Dogansmoobs" <dogansmoobs@softhome.net> wrote in message
news:94ak0c$dgk$1@nnrp1.deja.com...
> I am having some trouble using the CGI module. Well, take a look at my
> code and tell me if there is something staring right in my face and I
> just don't see it.
>
> #!/usr/local/bin/perl -w
> use CGI;
I'll say it because I know someone else will, you should always use strict;
and -T in the #! line
> $query = new CGI;
>
> # A message board system
> # Also, most of this code will be used for the news posting system
>
> # First open the message counter and get the number of messages already
> there
> # Check for a lockfile and open it (lock the counter)
> while (-e "lockfile")
> { sleep(1); }
> open (LOCKFILE, ">lockfile");
>
Why not lock the counter file itself, I can see the above not always
working, if the script executes at the same exact time, it will not work,
both scripts will wait 1 second, then proceed causing undesirable results,
try using flock on the counter file itself..
Should also catch any errors when opening a file:
ex.
open (LOCKFILE, ">lockfile") or die "Can't open lockfile";
> # Open the counter file, read the number, increment and write it back
> if (open (COUNTERFILE, "msg_counter")) then ($numMsg = <COUNTERFILE>;)
proper syntax i believe:
if (open (COUNTERFILE, "msg_counter")) {
$numMsg = <COUNTERFILE>;
} else
($numMsg = 0;);
};
> $numMsg++;
> close (COUNTERFILE);
>
> open (COUNTERFILE, ">msg_counter");
> print (COUNTERFILE "$numMsg");
I've always used print <filehandle> ("what to print"); I don't know if it
matters
ex.
print COUNTERFILE ("$numMsg");
> close (COUNTERFILE);
>
> # Close the lockfile and delete it
> close (LOCKFILE);
> unlink ("lockfile");
>
> # Get the variables and the values
> $posterNick = $query->param('nick');
> $posterEmail = $query->param('e-mail');
> $postTime = gmtime();
> $subject = $query->param('subject');
> $message = $query->param('message');
>
Just a note, make sure the query string parameters sent are all lowercase,
param IS case sensative, you should also add something like this:
my $message = $query->param('message') || '';
otherwise, if parameter doesn't exist, and you try and use $message, perl -w
won't hastle as being uninitialized variable...
> # Open a new file and write the information
> open (POSTFILE, ">$numMsg");
> print (POSTFILE "$numMsg");
> print (POSTFILE '0');
> print (POSTFILE "$posterEmail");
> print (POSTFILE "$posterNick");
> print (POSTFILE "$postTime");
> print (POSTFILE "$subject");
> print (POSTFILE "$message");
>
> # Close the file
> close (POSTFILE);
>
Probably want to have some sort of hard coded path to append to the files,
not in the same dir as your script....
ex:
my $Post_Dir = '/usr/posters/';
my $Temp_Dir = '/var/temp/';
then append like
my $Post = $Post_Dir . $numMsg;
>
> This doesn't get anywhere and it dies with error messages complaining
> that $query is undifined (it's not, $query = new CGI). I know the
> server supports the CGI module, but I have never used it before. Thank
> you.
>
Does it tell you what line?
> - Dogansmoobs
> dogansmoobs@softhome.net
> http://dogansmoobs.cjb.net/
> If I were an infinite monkey, I'd make infinite toast.
>
>
> Sent via Deja.com
> http://www.deja.com/
My answers are not a solution or answer to your problem, but I have given
some good suggestions without being condesending (as some posters appear
:) ) Hope this helps make your perl experience more pleaseant.
-Arthur
usually the CGI.pm module needs to be installed in /usr/local/bin/site/lib
or /usr/local/bin/lib, and those paths must be in the env for this to work.
But since it didn't tell you it couldn't find the CGI.pm, it looks like your
ok on that end... It may be the case of case sensativity (although I have
not looked at the results for sending mixxed match cases to my scripts.)
------------------------------
Date: Sat, 20 Jan 2001 14:29:40 GMT
From: Mark <mtaylorlrim@my-deja.com>
Subject: Re: Deleting a line from file
Message-Id: <94c7ch$i6f$1@nnrp1.deja.com>
In article <94c49e$fv3$1@nnrp1.deja.com>,
djin1@hotmail.com wrote:
> I am currently doing something that requires two processes. The first
> process will do something and then occasionally append some data to a
> file. The second process needs to read the top of the file and then
> delete the data from there. So, while the first process continuously
> appends to the file, the second process continuously grabs whatever is
> at the top of the file.
>
> I don't require a database for this, just plain old text file will do.
> The problem is, how do I do that grabbing and deleting for the second
> process?
>
> Gene
>
> Sent via Deja.com
> http://www.deja.com/
>
Depends on the size of the file somewhat. If you open the file and
assign the contents to an array, the shift command will assign the top
element to a variable then remove it. Then write the array back to the
file.
Remember, big file equals lots of memory to do this...
Mark
--
Please reply to this newsgroup as my Deja mail
is used as a spam catcher only!
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Sat, 20 Jan 2001 15:56:57 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Deleting a line from file
Message-Id: <slrn96j61l.9cm.tadmc@tadmc26.august.net>
djin1@hotmail.com <djin1@hotmail.com> wrote:
>I am currently doing something that requires two processes. The first
>process will do something and then occasionally append some data to a
>file. The second process needs to read the top of the file and then
>delete the data from there. So, while the first process continuously
^^^^^^
>appends to the file, the second process continuously grabs whatever is
^^^^^^
>at the top of the file.
You have described what is known as a "queue" data structure
(maintained in a file rather than in memory).
One process locks the file, adds a line at the end of the file,
and unlocks the file.
The other process locks the file, reads and removes the first line,
and unlocks the file.
>I don't require a database for this, just plain old text file will do.
>The problem is, how do I do that grabbing and deleting for the second
>process?
One of the Frequently Asked Questions found with either of these,
whose keywords you yourself have already mentioned:
perldoc -q delete
perldoc -q append
will likely help with the add-a-line and remove-a-line part
of the solution to your problem.
perldoc -q lock
perldoc -f flock
will get you started on the file-locking part.
To learn about Perl interprocess communication:
perldoc perlipc
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 20 Jan 2001 17:34:24 GMT
From: djin1@my-deja.com
Subject: Re: Deleting a line from file
Message-Id: <94ci70$q7o$1@nnrp1.deja.com>
Actually, I have to save the data. My apologies for not saying this in
the earlier post. The second process needs to send the data to a remote
server. If the server isn't up, the second process will keep checking
to see whether the server has come online and then start sending the
data again. Even if the server isn't up, the first process will
continue adding in data. Sort of like a tmeporary buffer.
Gene
>
> So, you don't save the data, and you are using the file strictly for
> interprocess communication. The mechanisms for IPC are well defined;
you
> might want to look at pipes for a start.
>
>
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Sat, 20 Jan 2001 18:16:53 +0000
From: Jamie O'Shaughnessy <jamie.oshaughnessy@ntlworld.com>
Subject: Re: Deleting a line from file
Message-Id: <7dlj6t86b7hj462s2qqphvgmt5a1c2rjus@4ax.com>
On Sat, 20 Jan 2001 13:36:45 GMT, djin1@hotmail.com wrote:
>I am currently doing something that requires two processes. The first
>process will do something and then occasionally append some data to a
>file. The second process needs to read the top of the file and then
>delete the data from there. So, while the first process continuously
>appends to the file, the second process continuously grabs whatever is
>at the top of the file.
>
>I don't require a database for this, just plain old text file will do.
>The problem is, how do I do that grabbing and deleting for the second
>process?
>
>Gene
>
>
>Sent via Deja.com
>http://www.deja.com/
Others have commented on this, but as an alternative, how about each
'message' being a file itself, named as a timestamp so the other
process can just read the dir contents ordered by filename. Saves
messing around with locks.
Better still, if persistence of the messages isn't important, use
pipes.
Jamie
------------------------------
Date: Sat, 20 Jan 2001 18:31:41 +0000
From: Jamie O'Shaughnessy <jamie.oshaughnessy@ntlworld.com>
Subject: Re: Deleting a line from file
Message-Id: <dbmj6t4u4aup5j2gj135kv09mbi1frouol@4ax.com>
On Sat, 20 Jan 2001 17:34:24 GMT, djin1@my-deja.com wrote:
>Actually, I have to save the data. My apologies for not saying this in
>the earlier post. The second process needs to send the data to a remote
>server. If the server isn't up, the second process will keep checking
>to see whether the server has come online and then start sending the
>data again. Even if the server isn't up, the first process will
>continue adding in data. Sort of like a tmeporary buffer.
Don't forget to code for you running out of disk space... :)
Jamie
------------------------------
Date: Sat, 20 Jan 2001 12:37:03 -0600 (CST)
From: dennis100@webtv.net (BUCK NAKED1)
Subject: Directory Last Modified
Message-Id: <10842-3A69DACF-24@storefull-244.iap.bryant.webtv.net>
How do you get the Last Modified (or if-modified-since) time from a
directory? I don't want to use any more modules than the LWP::Simple and
CGI (':standard) that I'm already using. I've looked for 2 days and
can't find any info on how to do this. Here is what I'm trying.
while (readdir <$dir*>) { $modtime = (localtime((stat _)[9]));
print "Age of directory $dir is $modtime<BR>" } ;
My final goal is to remove a directory after a certain amount of time.
Thanks,
Dennis
------------------------------
Date: Sat, 20 Jan 2001 09:00:38 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: FAQ 9.15: How do I decode a CGI form?
Message-Id: <3A69C436.2F124D2D@stomp.stomp.tokyo>
"Alan J. Flavell" wrote:
> On Sat, 20 Jan 2001, Joe C. Hecht wrote:
> (quoting someone who hasn't shown up here)
> > > Writing your own read and parse routine for handling
> > > form action input data is infinitely superior to
> > > this cgi.poopmaker, which is a well documented source
> > > of problems and has a history of continuous upgrades
> > > to compensate for these endless problems.
> > Too true!
> So you'd both rather keep your own unreviewed bugs, than have a whole
> team of specialist volunteers world-wide working on submitting fixes
> to the author, without any particular effort on your part? Strange.
(snipped remaining meandrous ramblings)
I am exceptionally clear on your ignorance and lack
of acceptable reading comprehension skills. This
clarity of mind comes to me based on your extensive
of history in this group and many groups, of trolling
and causing problems to such a degree many join in
on suggesting you leave a newsgroup. Additionally,
my clarity on your intellectual shortcomings is rather
exasperated by your persistent habit of going off on
some unrealated topic area to afford yourself a chance
to impotently masturbate your ego via innane postings.
Your ignorance is equally clear based upon your pulling
" unreviewed bugs " out of a top hat much like a rabbit.
I've made no comment of this nature nor am I associated
with this other author you have indicated is my cohort
in unspeakable crimes of such a horrendous nature only
a team of worldwide super X-men can save Perl Perl Land.
These life threatening Perl Crimes of yours, these bugs
you pull out of a hat employing less than skillful ego
sleight of hand, are well documented and nothing new.
Masturbate your fragile male ego at the expensive of
others. I am a high class callgirl displaying a price
tag well beyond your mental financial abilties; you
are a bit too short on mind money to entertain me
in a fashion suitable for my intellectual lifestyle.
Godzilla!
------------------------------
Date: Sat, 20 Jan 2001 16:50:17 GMT
From: utsav_ratti@my-deja.com
Subject: LDAP & SSL in Perl
Message-Id: <94cfk7$oam$1@nnrp1.deja.com>
I am trying to put together a script that will authenticate a user
against an LDAP directory, but SSL encryption is a requirement.
Any suggestions of appropriate Perl modules would be much appreciated.
Working code examples would be even better! :)
Thanks,
Utsav
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 20 Jan 2001 10:07:47 -0500
From: stanb@panix.com (Stan Brown)
Subject: localtim() problem
Message-Id: <94c9k3$akp$1@panix3.panix.com>
OK, what am I doing wrong here?
#!/usr/local/bin/perl -w
# get the current date and time, convert it to a nice format
($sec,$minute,$hour,$mday,$month,$year,$wday,$yday,$isdst) =
localtime(time);
$year = $year + 1900;
$month = $month + 1;
print("sec = $sec\n");
print("minute = $minute\n");
print("hour = $hour\n");
print("mday = $mday\n");
print("month = $month\n");
print("year = $year\n");
print("wday = $wday\n");
print("yday = $yday\n");
print("isdst = $isdst\n");
Script started on Sat Jan 20 10:06:36 2001
$ ./foo.pl
sec = 44
minute = 6
hour = 10
mday = 20
month = 1
year = 2001
wday = 6
yday = 19
isdst = 0
Script done on Sat Jan 20 10:06:46 2001
It's NOT January!
------------------------------
Date: 20 Jan 2001 10:46:47 -0500
From: stanb@panix.com (Stan Brown)
Subject: Re: localtim() problem
Message-Id: <94cbt7$bv8$1@panix3.panix.com>
In <94c9k3$akp$1@panix3.panix.com> stanb@panix.com (Stan Brown) writes:
>OK, what am I doing wrong here?
Never mind :-(
Why did I think it was February alreadt ??????
------------------------------
Date: Sat, 20 Jan 2001 17:46:03 GMT
From: "David Sisk" <davesisk@ipass.net>
Subject: Re: Multiprocess or multithreaded???
Message-Id: <v9ka6.16631$Kl5.2103202@typhoon.southeast.rr.com>
Wow, no one has an opinion on this? I'm surprised. I thought it was quite
an interesting question too! Is there anywhere else that someone could
suggest to post this?
David Sisk <davesisk@ipass.net> wrote in message
news:rjW96.6183$Kl5.781522@typhoon.southeast.rr.com...
> I have a batch job that will start as a serial job, then parallelize
itself
> (using fork), then re-synchronize and finish as a serial job. I can do
this
> one of two ways:
>
> 1) Create the part that will be parallelized as a subroutine that will
only
> be run by the forked children.
> 2) Create the part that will be parallelized as a seperate Perl script,
> which will be forked, then exec'd.
>
> As best I can understand from the perlfork and perlipc docs on
> www.perldoc.com, approach 1 will (from the O/S perspective) run the forked
> children as threads in a single Perl process, while approach 2 will run
the
> forked/exec'd children as seperate Perl processes (again from the O/S
> perspective). [Note: I'm not using Perl threads. According to the docs,
> forking with no exec runs the children as threads, even though they appear
> as pseudo-processes to the Perl script.] I will probably have about
50-100
> children, and each child will be pulling data via HTTP using the LWP
module,
> then parsing and storing the data using DBI. I'm developing this on NT, I
> may initially run it on NT (merely because it's convenient), but will
> probably eventually run it on Linux (because I like it better, it should
be
> easier to manage, and should perform a little better.).
>
> Question:
> Which approach (1 or 2) is likely to work best? I'd imagine that creating
> it as multi-process (#2) will probably be more stable on both platforms,
> while creating it as multi-threaded (#1) will use less resources and
> possibly run quicker, but be less stable, on both platforms. Does anyone
> have any experience or educated opinions that would help me make this
> decision?
>
> Best regards,
> Dave
>
>
>
------------------------------
Date: Sat, 20 Jan 2001 15:00:31 GMT
From: "bigdawg" <ewsr1@home.com>
Subject: Newbie question
Message-Id: <jKha6.25796$B6.7985455@news1.rdc1.md.home.com>
Here is what I'd like to do. I am using Activestate on a Win32 system.
I'm also not clear as to which modules may be needed.
1. change to a specific directory
2. read the directory
# using readdir()
3. delete all directories older than $days_old
# using unlink()
4. write output to an existing file to track deleted directories
# using open()
------------------------------
Date: Sat, 20 Jan 2001 18:43:37 +0100
From: snef <snef@soneramail.nl>
Subject: percentages, how?
Message-Id: <MPG.14d3ecb66dca7580989706@news.soneraplaza.nl>
Hi,
I've got a problem.
imagine:
I've got 3 characters: a, b, c in an array (@x)
Now I want to get one character randomly
This is easy. Something like $a[rand 3].
but now i want to add some winning percentages. The change to get b must
be 80%.
How can I do this?
Snef.
------------------------------
Date: 20 Jan 2001 08:43:22 -0600
From: claird@starbase.neosoft.com (Cameron Laird)
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <092443F3EA920825.8A0B7CC4DE2290C9.9D30263025876EED@lp.airnews.net>
In article <9dba6.6541$d25.40444@newsfeed.slurp.net>,
James Kauzlarich <nospam-abuse@[127.0.0.1]> wrote:
.
.
.
><jgore@home.com> wrote in message news:3a691a7b.159438080@24.14.77.6...
>> >On Sat, 20 Jan 2001 02:47:55 GMT, tadmc@augustmail.com (Tad McClellan)
>wrote:
.
.
.
>> >You are expected to check the Perl FAQ *before* posting to
>> >the Perl newsgroup.
>>
>> I did read it. It didn't say a great deal.
>(snip)
>
>> Or, did you see something in those two short paragraphs in the
>> FAQ
>
>Third, evidently you did NOT read the FAQ. The Perl FAQ is huge. It sounds
>like you may have read one porrtion of the FAQ, but it is so large that it
>is posted in parts over several days (which, incidently is why it said FAQ
>X.XX. Each part incliding a link to a cpan.org which has the whole FAQ. It
>would be nice if they included an url directly to the FAQ, so here one is
>http://www.cpan.org/doc/manual/html/pod/perlfaq.html
.
.
.
I'm sure not getting it. I understand jgore to have
said, "I looked through the English-language Perl FAQ,
and all I found on perlcc and Perl2Exe was
<URL:http://www.perl.com/pub/doc/manual/html/pod/perlfaq3.html#How_can_I_compile_my_Perl_progra>
(or mirrors, several of them not current). These
paragraphs are, of course, almost hostile to any
attempts to make productive use of the available
compilers." Is this not accurate?
Perldoc takes one further, of course
<URL:www.cpan.org/doc/manual/html/utils/perlcc.html>,
but it still doesn't answer what I understand to be
jgore's question: is there a coherent tutorial for use
of the Perl compilers? Yes, you have given a URL for
the FAQ; perhaps you can demonstrate how to use this
URL to arrive at the information jgore is after.
--
Cameron Laird <claird@NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
------------------------------
Date: Sat, 20 Jan 2001 16:47:44 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <slrn96j1k1.9cm.tadmc@tadmc26.august.net>
jgore@home.com <jgore@home.com> wrote:
>
>
>I didn't know that there were tabu subjects in Perl.
There aren't.
There are off-topic subjects in comp.lang.perl.misc though.
If you had followed the standard netiquette advice of lurking
for a while before posting you _would_ have known that.
>I guess "closed
>source" does sound repugnant to those who took the bit while learning
>Linux, an open source OS.
"closed source" does sound repugnant to those who took the
bit while learning Perl. Perl is not related to Linux.
Perl was born several years before Linux.
>Still, I would think that would make
>everyone even more open to different ideas and cultures. I guess not!
You can hide your program if you like, no problem, go ahead.
But volunteers, as in Usenet newsgroups, can of course decide
what they want to volunteer to help with and what they don't
want to help with.
Most here will choose to not help you. You can still do it, you
just can't get much free help in doing it.
That is consistent with how _you_ do business. You want to charge
for your Perl program, you should pay to figure out how to
charge for your Perl program.
If you give away your Perl program, you can probably get free help.
What's good for the goose is good for the gander.
>No need to put me in a kill-file, hehe.
Too late.
>I doubt I will be back.
Thank you.
>I don't like to have to walk on tip-toes for anyone.
You don't have to walk on tiptoes with employees. Hire a Perl
expert to help you.
[ snip about a hundred lines of backwards-time quoted stuff,
including an entire article and .sigs
]
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 20 Jan 2001 16:47:45 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <slrn96j26c.9cm.tadmc@tadmc26.august.net>
jgore@home.com <jgore@home.com> wrote:
>>On 20 Jan 2001 00:49:33 GMT, abigail@foad.org (Abigail) wrote:
>>
>>jgore@home.com (jgore@home.com) wrote on MMDCXCVIII September MCMXCIII in
>><URL:news:3a68d192.140770597@24.14.77.6>:
>>@@ Perl - Bytecode, Compile to C, Perl2EXE
>>@@
>>@@ I'm confused!
>>@@ I have a perl (CGI) program which uses many other modules.
>>@@ I can run it on my own server just fine.
>>@@
>>@@ I have two problems:
>>@@ 1) I would like to distribute the program but not the source.
>>
>>I've a solution, but just as you, I like to keep it hidden.
>
>What is your solution? you didn't say.
You have not paid for the solution.
That is her point!
She is applying the Golden Rule.
You will not tell your solution to your customers (unless they pay),
so Abigail will not tell her solution to you (unless you pay).
Seems equitable.
>>@@ 2) I would like to run it on my ISP 's server (simplehost.com).
>>
>>That's not a Perl problem.
>
>Didn't say it was.
You posted it in a Perl newsgroup, so you _did_ say it was.
If you thought it was a non-Perl problem, then you would have
asked it in a non-Perl newsgroup.
>>@@ PERL2EXE:
>>@@ I could use PERL2EXE and make an executable but my ISP doesn't allow EXE's i
>>
>>Very sensible. I wouldn't allow any user to run any CGI program, so
>>consider yourself lucky.
>
>You wouldn't get my business.
I doubt that Abigail needs or desires your business.
>>@@
>>@@ Compile to C:
>>@@ Does this work? Any tutroial pages on it anywhere?
>>
>>Did you try?
>
>Should I waste my time on it?
We could tell you that for free (you could give away your program for
free), but we choose not to (and you choose not to give away your
program).
Seems fair. You are being put in the position that you want to
put your customers into. How's it feel?
>and we shouldn't have to "give away" something we worked hard on.
Larry worked hard on Perl itself, and gave it away.
You want to use the fruits of his labor for your own commercial
interests. Certainly allowed, but nobody is under any obligation
to help you do it.
Open source projects can expect volunteer help. Commercial
ventures can expect to pay commercial rates for whatever it
is that they need. Expecting to have it both ways is an
unrealistic expectation.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 20 Jan 2001 16:47:46 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <slrn96j331.9cm.tadmc@tadmc26.august.net>
jgore@home.com <jgore@home.com> wrote:
>>On Sat, 20 Jan 2001 02:47:55 GMT, tadmc@augustmail.com (Tad McClellan) wrote:
>>jgore@home.com <jgore@home.com> wrote:
>>>
>>>I have two problems:
>>>1) I would like to distribute the program but not the source.
>>
>>
>>Rewriting your program in a different programming language
>>is an option. But compiled programs are not "secret" either.
>
>Rewriting Perl to something else sorta defeats writing it in Perl
>in the first place, heh.
My point was if you want to distribute a closed-source program,
then Perl is not a good choice of language to develop with.
You have made a poor design decision, given your objectives.
It is not up to us to help you overcome your poor decision.
>>>Do most ISP's allow bytecode?
>>
>>
>>You should ask WWW-related questions in one of the newsgroups
>>related to WWW stuff. This is not one of those newsgroups,
>>we discuss Perl here.
>
>Chill Bro ! It is a question about Perl.
It is not. It is a question about ISP policies.
>I had assumed that some perl programmers had experience running their
>programs on an ISP.
I assume that some veterinarians have experience in stopping
arterial bleeding, but I don't think I'd go to the animal
hospital when I cut my finger off.
I want the most expert of opinions. I'd seek an M.D.
The most expert of Perl opinions are found in Perl newsgroups.
The most expert of ISP policy opinions are found in some
newsgroup related to ISPs.
>I thought they might have some good advice about
>running Perl there.
Veterinarians have some good advice about how to stop arterial bleeding.
Doctors are likely to have even better advice.
Do you want the best or the second-best advice?
>>Perl FAQ, part 3:
>>
>> "How can I hide the source for my Perl program?"
>>
>>You are expected to check the Perl FAQ *before* posting to
>>the Perl newsgroup.
>
>I did read it.
That was not apparent in your posting.
>You will notice I asked that
>several times.
Nobody is obligated to help you.
If nobody volunteers to help you, then you aren't going to
get help this way. Try some other way.
>I'm prescribing Lithium and Valium for everyone here!
>Everyone sure seems hostile.
You expect everybody to just silently let you do it when you
take cuts in line? That too seems an unrealistic expectation.
-----------------------------------------------------------------------
In article <1995Nov9.193745.13694@netlabs.com>, lwall@netlabs.com (Larry
Wall) wrote: ...
<Larry> [snip] I view a programming language as a place to be
<Larry> explored, like Disneyland. You don't need to have a lot of preparation
<Larry> to explore a theme park. You do have to go along with the crowd
<Larry> control measures, though. In a sense, each ride has its own
<Larry> prerequisites--if you cut in line, you risk getting tossed out of the
<Larry> park.
<Larry>
<Larry> What we have here in this newsgroup is a failure in crowd control.
<Larry> Reading the FAQ is like staying in line--it's something you should
<Larry> learn in kindergarten. Usenet needs a better kindergarten.
-----------------------------------------------------------------------
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 20 Jan 2001 18:37:04 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Powerful Technique 3606
Message-Id: <qhmj6t48suqg5alkh9dealk4r43effahl9@4ax.com>
zoycit@email.com wrote:
>pmpmofcqxzgkvsvpobtjfurjdfxnjqmo
This was the most sensible sentence in the whole post. ;-)
Does anybody know how to write a regex that matches this kind of
neonsense? You can easily recognize it by eye, but... is there really a
pattern? At least 4 consonants in a row?
I thought of applying a filter that works on subject lines ending with a
number. The only problem is that it would also kill legitimite (=
non-spam) posts with titles like "problem on Windows 2000".
--
Bart.
------------------------------
Date: 20 Jan 2001 18:20:31 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: regular expression question. pls help
Message-Id: <slrn96jlk8.834.ben-fuzzybear@Odin.Thor>
The ancient archives of Wed, 17 Jan 2001 18:37:24 -0500 showed
Tad McClellan of comp.lang.perl.misc speaking thus:
>Ben Okopnik <ben-fuzzybear@geocities.com> wrote:
>>The ancient archives of Wed, 17 Jan 2001 23:35:49 GMT showed
>>Tad McClellan of comp.lang.perl.misc speaking thus:
>>>
>>>That matches only dot and space characters. Your string has a
>>>double quote and an angle bracket there, so the match must fail.
>>>
>>>Is there some reason why the below won't work?
>>>
>>> my $matchKey = "UPT PIR\"><value>(.*?)</value>"; # worst
>>>
>>>or
>>>
>>> my $matchKey = qq!UPT PIR"><value>(.*?)</value>!; # better
>>>
>>>or
>>>
>>> my $matchKey = 'UPT PIR"><value>(.*?)</value>'; # best
>>
>>
>>Why are the above "graded" that way? I just see them as TMTOWTDI;
>
>
>I see a progression in how communicative each is.
>
>I'm just leaving bread crumbs to follow when I have to return
>to the code after not seeing it for a long time.
>
>I am most often looking for variables when debugging. With the
>"best" method, I have to read less than half of the line
>('til when I see the single quote) to determine that I can
>go to the next line. With the other two I have to carefully
>examine the entire line.
>
>I'm lazy and impatient.
<grin> Say, I _recognize_ that from somewhere...
Thank you, Tad. An exposition on _why_ people do things in a certain way
is often more educational than _how_ to do things.
>I do not use double quotes unless I need one of the 2 things that
>they give you over single quotes, so I always use single quotes
>for constant strings (unless I need backslash escape chars).
Hmm. I'd been using double quotes by default, but I'm going to have a bit
of a think about that... not that I'll necessarily change it, but I will
give the topic some more consideration.
Ben Okopnik
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
to be nobody but yourself in a world means to fight the hardest battle
which is doing its best night and day any human being can fight and
to make you like everybody else never stop fighting.
-- e.e. cummings
------------------------------
Date: Sat, 20 Jan 2001 17:27:05 GMT
From: "David Sisk" <davesisk@ipass.net>
Subject: Re: Spawning Parallel Processes
Message-Id: <JTja6.16602$Kl5.2085640@typhoon.southeast.rr.com>
Hi:
I know your pain. I couldn't find a good example of this anywhere (or at
least not one I understood) Search this newsgroup for a posting called
"fork lots of children". A fellow posted an example a couple of days ago
that shows exactly how to do what you want. It doesn't use signals, which
(to my understanding) is a good thing.
Regards,
Dave
<arkconfused@hotmail.com> wrote in message
news:94au46$lrp$1@nnrp1.deja.com...
> I have been trying to look at away to have a perl script spawn off 7
> processes and to have them run at the same time. Each process telnets
> into a different server. Any ideas?
>
> --
> ARKConfused
>
> arkconfused@hotmail.com
>
>
> Sent via Deja.com
> http://www.deja.com/
------------------------------
Date: 20 Jan 2001 18:25:02 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: Suppressing stderr on `` commands
Message-Id: <slrn96jlso.834.ben-fuzzybear@Odin.Thor>
The ancient archives of Sat, 20 Jan 2001 01:43:17 GMT showed
Tad McClellan of comp.lang.perl.misc speaking thus:
>James Taylor <james@NOSPAM.demon.co.uk> wrote:
>
>>but there is no perldoc on my system
>
>
>Why not?
>
>It is part of a normal install.
>
>I do not know of any platforms where perl is available and
>perldoc is not available (since perldoc is written in perl).
>
>If perl is broken on some platform, I'd like to know about it
>even if I don't use that platform. Please share it with us,
>maybe somebody will even fix it for that platform.
In my (admittedly short) experience with the default install of Solaris 8,
'/usr/perl5/bin' is not part of $PATH, nor is '/usr/perl5/man' part of
$MANPATH.
Ben Okopnik
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I never believed in Santa Claus because I knew no white dude would
come into my neighborhood after dark. -- Dick Gregory
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 106
**************************************