[17945] in Perl-Users-Digest
Perl-Users Digest, Issue: 105 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jan 20 09:05:26 2001
Date: Sat, 20 Jan 2001 06:05:07 -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: <979999507-v10-i105@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 20 Jan 2001 Volume: 10 Number: 105
Today's topics:
Deleting a line from file djin1@hotmail.com
Re: Deleting a line from file <bowman@montana.com>
Emacs modules for Perl programming (Jari Aalto+mail.perl)
Re: FAQ 9.15: How do I decode a CGI form? <flavell@mail.cern.ch>
Re: GD.pm/ImageMagick - Any thing better? (Martien Verbruggen)
Re: Hello. I'm back. <bart.lateur@skynet.be>
Re: help me (fetching pages from net) <wyzelli@yahoo.com>
Re: List Current Processes in Win32 <carvdawg@patriot.net>
MIME::Lite To => many receivers (with name) <johnlin@chttl.com.tw>
Re: Perl - Bytecode, Compile to C, Perl2EXE jgore@home.com
Re: Perl - Bytecode, Compile to C, Perl2EXE (Abigail)
Re: Perl - Bytecode, Compile to C, Perl2EXE (Martien Verbruggen)
Re: Perl script problem <ian@ianwaters.com>
Re: PWS - perl (ATTN: cwrites) <bigrich318@yahoo.com>
Re: Suppressing stderr on `` commands <james@NOSPAM.demon.co.uk>
Words in Perl - Pulling Hair <smullett@omeninc.com>
Re: Words in Perl - Pulling Hair gnari@my-deja.com
Re: Words in Perl - Pulling Hair (Martien Verbruggen)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 20 Jan 2001 13:36:45 GMT
From: djin1@hotmail.com
Subject: Deleting a line from file
Message-Id: <94c49e$fv3$1@nnrp1.deja.com>
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/
------------------------------
Date: Sat, 20 Jan 2001 07:00:23 -0700
From: "bowman" <bowman@montana.com>
Subject: Re: Deleting a line from file
Message-Id: <VSga6.6624$d25.43107@newsfeed.slurp.net>
<djin1@hotmail.com> wrote in message news:94c49e$fv3$1@nnrp1.deja.com...
> 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.
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.
------------------------------
Date: 20 Jan 2001 12:49:12 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_979994924@rtfm.mit.edu>
Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
URL: http://tiny-tools.sourceforge.net/
Maintainer: Jari Aalto <jari.aalto@poboxes.com>
Announcement: "What Emacs lisp modules can help with programming Perl"
Preface
Emacs is your friend if you have to do anything comcerning software
development: It offers plug-in modules, written in Emacs lisp
(elisp) language, that makes all your programmings wishes come
true. Please introduce yourself to Emacs and your programming era
will get a new light.
Where to find Emacs
XEmacs/Emacs, is available to various platforms:
o Unix:
If you don't have one, bust your sysadm.
http://www.gnu.org/software/emacs/emacs.html
http://www.xemacs.org/
Emacs resources at http://home.eu.org/~jari/emacs-elisp.html
o W9x/NT:
http://www.gnu.org/software/emacs/windows/ntemacs.html
Emacs Perl Modules
Cperl -- Perl programming mode
.ftp://ftp.math.ohio-state.edu/pub/users/ilya/perl
.<olson@mcs.anl.gov> Bob Olson (started 1991)
.<ilya@math.ohio-state.edu> Ilya Zakharevich
Major mode for editing perl files. Forget the default
`perl-mode' that comes with Emacs, this is much better. Comes
starndard in newest Emacs.
TinyPerl -- Perl related utilities
.http://home.eu.org/~jari/tiny-tools-beta.zip
.http://home.eu.org/~jari/emacs-tiny-tools.html
If you ever wonder how to deal with Perl POD pages or how to find
documentation from all perl manpages, this package is for you.
Couple of keystrokes and all the documentaion is in your hands.
o Instant function help: See documentation of `shift', `pop'...
o Show Perl manual pages in *pod* buffer
o Load source code into Emacs, like Devel::DProf.pm
o Grep through all Perl manpages (.pod)
o Follow POD manpage references to next pod page with TinyUrl
o Coloured pod pages with `font-lock'
o Separate `tiperl-pod-view-mode' for jumping topics and pages
forward and backward in *pod* buffer.
o TinyUrl is used to jump to URLs (other pod pages, man pages etc)
mentioned in POD pages. (It's a general URL minor mode)
TinyIgrep -- Perl Code browsing and easy grepping
[TinyIgrep is included in the tgz mentioned above]
To grep from all installed Perl modules, define database to
TinyIgrep. There is example in the tgz (ema-tigr.ini) that shows
how to set up datatbases for Perl5, Perl4 whatever you have
installed
TinyIgrep calls Igrep.el to run the find for you, You can adjust
recursive grep options, ignored case, add user grep options.
You can get `igrep.el' module from <kevinr@ihs.com>. Ask for copy.
Check also ftp://ftp.ihs.com/pub/kevinr/
TinyCompile -- Browsing grep results in Emacs *compile* buffer
TinyCompile is minor mode for *compile* buffer from where
you can collapse unwanted lines, shorten the file URLs
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT
-->
cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
file1:NNN: MATCHED TEXT
file1:NNN: MATCHED TEXT
End
------------------------------
Date: Sat, 20 Jan 2001 13:16:49 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: FAQ 9.15: How do I decode a CGI form?
Message-Id: <Pine.LNX.4.30.0101201308050.8573-100000@lxplus003.cern.ch>
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.
I consider myself reasonably well-informed about browser bugs, but
there are fixes in CGI.pm for browser bugs that I was unaware of, and
thus couldn't possibly have devised workarounds for. And that's only
one of the benefits of using a peer-reviewed module, that gets fixed
when problems are found.
Perhaps if you'd show us some examples of your replacement code,
people here could usefully comment.
There are some people who know enough about Perl and CGI to understand
_why_ they aren't using CGI.pm. Maybe you just happen to be one of
them, and we'll find that out when you post some more details. Maybe.
------------------------------
Date: Sun, 21 Jan 2001 00:42:52 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: GD.pm/ImageMagick - Any thing better?
Message-Id: <slrn96j5es.bgr.mgjv@martien.heliotrope.home>
On Sat, 20 Jan 2001 07:31:58 GMT,
Sterling <smullett@omeninc.com> wrote:
> H-
>
> I'm currently using GD.pm to create png files on the fly. But the
> resolutions (circles for instance) aren't that great and have a lot of
> pixelation.
> I had looked into using Magick but it really doesn't do all the drawing
> things that I'll need.
That surprises me a bit. What sort of drawign are you able to do with GD
that you can't do with Image::Magick? I tend to believe that
Image::Magick has a lot more than GD. GD is just faster.
> I was wondering if anyone knew of any other more robust graphics
'more' robust? I hope you didn't mean to say that :) And if you did: In
which way are GD and Image::Magick not robust? I am genuinely
interested.
> packages that plug in easily with Perl that might provide better
> resolutions and image creations?
And again, I have to ask: What exactly is the problem with
Image::Magick? Could you be a bit more specific about what you need to
do? Maybe I can help you out by pointing out that maybe you're doing
something wrong, or maybe I can point you to some feature you don't know
about.
The only other modules that I know of that can be used for creation of
graphics at this level would be Term::Gnuplot and Imager. Imager is very
immature, and supports only a minumum of drawing functions.
Term::Gnuplot is mature, but only supports the barest minimum of
functionality as needed by the gnuplot program, which is the reason it
exists. Outside of GD and Image::Magick, for complex graphics work,
there is nothing.
Oh, I'm forgetting one: You can use the interface to the Gimp. But
prepare for a steep learning curve, and long searches through
documentation. if you're not already fluent with the Gimp itself, it's
hardly useful to even lok at the programmable Perl interface.
Martien
--
Martien Verbruggen |
Interactive Media Division | In a world without fences, who needs
Commercial Dynamics Pty. Ltd. | Gates?
NSW, Australia |
------------------------------
Date: Sat, 20 Jan 2001 10:55:33 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Hello. I'm back.
Message-Id: <iiri6todl0eeu9h985s7u0mn73djqunhq3@4ax.com>
jdf@pobox.com wrote:
>I couldn't get Deja to cough up the answer to the mystery of Larry's
>disappearance, though. Any clues?
Eh, no. All I have is this quote from Larry R. himself on some mailing
list, dated late July 2000:
>>My job focus has
>>shifted, and Perl plays no part in it now.
--
Bart.
------------------------------
Date: Sat, 20 Jan 2001 17:46:53 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: help me (fetching pages from net)
Message-Id: <BPba6.4$YF4.496@vic.nntp.telstra.net>
"Biswajit Dash" <bidash@cisco.com> wrote in message
news:979974687.159255@sj-nntpcache-3...
> Hi ,
> I am new to perl & also to this newsgroup. Please help me.
> I use the following code to fetch pages from internet & store it locally.
> My program runs as a process and fetches pages every 30 min interval.
>
>
> $req = new HTTP::Request 'GET' => $urlname;
> $req->header('Accept' => 'text/html');
> $res = $ua->request($req);
> if ($res->is_success) {
> @data = $res->content;
> open (FILE, ">>$filename") || die $!;
> print FILE @data;
> close(FILE);
> } else {
> print "Error: " . $res->status_line . "\n";
> }
>
> My problem is, I am behind a proxy, and my page always gets a cached
page,
> instead of the recent one.
> How can I fetch the recent copy of the page, from behind proxy ??
>
http://x76.deja.com/getdoc.xp?AN=714386355&CONTEXT=979978505.402653201&hitnu
m=2
That should help.
Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';
------------------------------
Date: Sat, 20 Jan 2001 08:17:37 -0500
From: H C <carvdawg@patriot.net>
Subject: Re: List Current Processes in Win32
Message-Id: <3A698FF1.21727955@patriot.net>
Win32::Perflib works fine...as does Win32::iPerfMon. Also, if you're in a
mixed NT/2K environment, installing WMI classes on all of your NT systems
may allow you to use one piece of code to get all of the information you
need.
Some examples of the usage of WMI are available from
http://www.roth.net/perl/scripts
marc_w@my-deja.com wrote:
> This can be gotten via Win32::Perflib which is included as a part of
> ActiveState's perl distribution. If you can, try to find a script that
> does it, and borrow the code. I believe the ActivePerl docs actually
> have a example to do exactly this in them..if not search on the web.
>
> Win32::Perflib is rather deep/complex to understand, so you may want to
> use what the other's mentioned in their reply's(Shelling out to some
> sort of .exe and capturing the output).
>
> Shelling out IMHO is generally cheating, but it is quick, crude, and
> efficient(to make anyways).
>
> marc
>
> In article <9477qg$71l$1@whqnews01.infinium.com>,
> "jg" <Jerry_Geist@infinium.com> wrote:
> > Can someone point me in the direction of how to get the entire list of
> > processes which are showing in the Windows NT Task Manager into a
> list.
> > After I close a program, it sometimes leaves child tasks running and
> I need
> > to check and see whether it exists or not.
> >
> > Thanks .
> >
> >
>
> Sent via Deja.com
> http://www.deja.com/
--
Q: Why is Batman better than Bill Gates?
A: Batman was able to beat the Penguin.
------------------------------
Date: Sat, 20 Jan 2001 18:58:40 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: MIME::Lite To => many receivers (with name)
Message-Id: <94br4f$68s@netnews.hinet.net>
Dear all,
I want to use MIME::Lite to send to many people.
I want the email addresses to have their real names.
The following is my code. Only the first one received
the email. The others didn't.
use MIME::Lite;
my $mail = new MIME::Lite(
From => 'johnlin@chttl.com.tw (John Lin)',
To => 'lin54321@hotmail.com (at hotmail), '.
'johnlin@chttl.com.tw (at company)',
Subject => 'test',
Data => "Hi\n"
);
$mail->send_by_smtp;
I think my format for sending multiple people might be wrong,
or the format to send "with name" was wrong.
Could you help me please?
Thank you very much.
John Lin
P.S. In the code
Data => "Hi\n";
If I don't append the "\n", the program will hang there.
It seems to be bug of MIME::Lite.
------------------------------
Date: Sat, 20 Jan 2001 09:36:10 GMT
From: jgore@home.com
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <3a695675.174794452@24.14.77.6>
Thank you, I appreciate the kind words.
Community leaders or not the others could learn a lot from you.
I didn't know that there were tabu subjects in Perl. I guess "closed
source" does sound repugnant to those who took the bit while learning
Linux, an open source OS. Still, I would think that would make
everyone even more open to different ideas and cultures. I guess not!
No need to put me in a kill-file, hehe. I doubt I will be back.
I don't like to have to walk on tip-toes for anyone. And, there are
many much more open forums in which I can ask anything about Perl.
Just thought I'd try here. But I see it was a mistake.
Anyways, thanks for setting me straight.
P.S. I was going by the docs that came with Active Perl. I'll search
around in my directories and see if I can find the Man pages or
something. The HTML link pages don't say much. Perhaps it was meant as
a summary. I'll also try your link to CPAN. Thanks.
Peace!
>On Sat, 20 Jan 2001 02:35:18 -0500, "James Kauzlarich" <nospam-abuse@[127.0.0.1]> wrote:
>
>jgore, you started off in this newsgroup all wrong. Let me try to point out
>some of your errors and give a bit of advice.
>
>Read and go in peace...
>
><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:
>
>(snip)
>
>> >>I have two problems:
>> >>1) I would like to distribute the program but not the source.
>
>First, I don't expect that you are going to find too much support for
>closed-source programming in a Newsgroup. I think you can safely assume
>that this is going to be pretty much a pro open-source community here.
>Hence Abigail's responce "I've a solution, but just as you, I like to keep
>it hidden."
>
>> >>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.
>> I had assumed that some perl programmers had experience running their
>> programs on an ISP. I thought they might have some good advice about
>> running Perl there.
>
>Second. Yes, this place is full of good advice about Perl. Writing Perl,
>not neccicarily running it. Perl is more than a script that runs on web
>servers, and asking what most ISP's do is deinatly a WWW question, not a
>Perl question.
>
>You might^H^H^H^H^H will find your question your question more warmly
>responded to in the comp.infosystems.www.authoring.cgi newsgroup. This
>group has people that MAY know the answer, but it's like busting into a Mac
>lovers convetion, grabbing the mic and asking an MSDOS question to the
>crowd. You'd be lucky to leave with only cold-stares.
>
>> >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 prescribing Lithium and Valium for everyone here!
>> Everyone sure seems hostile.
>>
>
>Fourth and lastly taking an attitude with two of the community leaders (and
>most knowledgable people) here is NOT a good way to get advice, though it is
>a good way to have your name and email address put into the killfiles of the
>best sources of information in this newsgroup. They have paid their dues
>here. You have not.
>
>Live and learn. 8-)
>
>jmk
>
>--
>do NOT remove the nospam from the repy to address above,
>instead send email to o1tech(at)skyenet(dot)net
>
>JAPN 8_(
>
>
------------------------------
Date: 20 Jan 2001 10:48:30 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <slrn96ir7u.80q.abigail@tsathoggua.rlyeh.net>
jgore@home.com (jgore@home.com) wrote on MMDCXCIX September MCMXCIII in
<URL:news:3a6914eb.158014296@24.14.77.6>:
__ >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.
As I said, I've hidden it; just like you like to hide your source code.
__ >@@ 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. But, most ISP's won't let you run EXE's.
__ I thought there might be other alternatives .
Just run the plain Perl program.
__ >@@ PERL2EXE:
__ >@@ I could use PERL2EXE and make an executable but my ISP doesn't allow EXE
__ >
__ >Very sensible. I wouldn't allow any user to run any CGI program, so
__ >consider yourself lucky.
__
__ You wouldn't get my business.
You wouldn't be able to afford it anyway.
__ >@@ ByteCode:
__ >@@ I can't find a lot info about this. The module doesn't say much about how
__ >@@ Do most ISP's allow bytecode? Does bytecode include all the other modules
__ >@@ uses (like an EXE) ? Any tutorial pages on this besides what comes with
__ >
__ >How should we know what the majority of the ISP's have for policies?
__
__ If Bytecode is built-in to perl then I would assume most ISP's allow it.
Did you ask your ISP?
__ >@@
__ >@@ Compile to C:
__ >@@ Does this work? Any tutroial pages on it anywhere?
__ >
__ >Did you try?
__
__ Should I waste my time on it?
You're wasting the time of all the people reading your postings. Are you
that arrogant that your think your time is more valuable than theirs?
And besides, if you waste your time asking to be spoonfed on Usenet, you
can waste your time trying things.
__ >@@ I'm just looking for the best way to distribute my program and run it on
__ >@@ allows perl. Any help appreciated!
__ >
__ >Use the source, Luke!
__
__ Source code is not an alternative. It's too hard for newbies to set up
__ and we shouldn't have to "give away" something we worked hard on.
Too hard to set up? In which sense is it harder to set up than a binary?
As for not giving away, why should anyway giving away the answers to
the questions you have? They worked hard to find them out.
Oh, and don't you think you are a hypocrite? If it wasn't for Larry and
all the others working hard on perl and giving it away for free, you
wouldn't face this problem.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Sun, 21 Jan 2001 00:34:05 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Perl - Bytecode, Compile to C, Perl2EXE
Message-Id: <slrn96j4ud.bgr.mgjv@martien.heliotrope.home>
On Sat, 20 Jan 2001 04:52:50 GMT,
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.
Read again. It wa simplicit that she wouldn't tell you. She wants to
keep it just as secret as you want to keep your code.
>>@@ 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. But, most ISP's won't let you run EXE's.
Those ISP's are idiots. There is nothing inherently more dangerous or
resource occupying to executable binaries than there is to executable
source code.
But I rather think that you might be mistaken when you use the word
'most'.
> I thought there might be other alternatives .
There are. Write your stuff in a language like C, and compile it. but
don't expect that that makes your algorithms or techniques very well
hidden. if your code really contains someting valuable, then the
executable will contain that as well, and it can be reverse engineered.
If it doesn't, then why are you worried?
A patent or copyright is much more effective.
>>@@ ByteCode:
>>@@ I can't find a lot info about this. The module doesn't say much
>>@@ about how to Do most ISP's allow bytecode? Does bytecode include all
>>@@ the other modules my uses (like an EXE) ? Any tutorial pages on
>>@@ this besides what comes with per
>>
>>How should we know what the majority of the ISP's have for policies?
>
> If Bytecode is built-in to perl then I would assume most ISP's allow it.
That's an odd logical flow. You say most ISP's do not allow EXEs, by
which I suppose you mean executable binaries. It is fairly standard for
C programs to be compiled to executable binaries. Are you telling em
that that isn't allowed? So... even _if_ compilation of Perl to bytecode
or machine code was standard, why would you think that the ISP would
suddenly change their mind about this? Just because the source was
written in perl instead of C?
> The docs don't say much about anything, which is why I was asking
> if anyone knew of a tutorial.
It's all fairly new and experimental. Little hope for a tutorial.
>>@@ Compile to C:
>>@@ Does this work? Any tutroial pages on it anywhere?
>>
>>Did you try?
>
> Should I waste my time on it?
Yep. because no one can be expected to waste _their_ time on it for you.
If you want something, you'll have to work for it.
>>@@ I'm just looking for the best way to distribute my program and run
>>@@ it on a st allows perl. Any help appreciated!
>>
>>Use the source, Luke!
>
> Source code is not an alternative. It's too hard for newbies to set up
> and we shouldn't have to "give away" something we worked hard on.
Why is it harder to set up? Don't answer, I'm not expecting an answer,
because I know the answer.
And as to the second part of that paragraph: You're a hypocrite. You are
using Perl. Perl, the language, and perl the program were created by
many, many hours of work by Larry Wall, and later by many other people.
I bet that you also use the free modules from CPAN. I am also quite
certain that you have no problem using other tools that people have
given away.
Are you going to offer them money?
There is nothing wrong with wanting money for your work, but the whole
context in which you have placed all this makes you hypocritical. Larry
Wall 'gave away' Perl, but he still has control over it. It's done with
copyrights. That's how you manage ownership in this world.
You never _have_ to "give away" (your quotes) something you worked hard
on. And whether you distribute those fruits of your labour as source or
bytecode is irrelevant.
> Thanks for trying anyways.................Anyone else?
Please, go away, and think about it for a while. If you then still
believe that your best bet is to compile your valuable code, and make it
'safe' that way, go ahead, but don't ask here. People here tend to know
better.
You were already advised of several pertinent questions and answers in
part 3 of the perl FAQ, I believe? Have you read them? If not, I suggest
you go _now_ and read them before posting any more in this thread.
Martien
--
Martien Verbruggen |
Interactive Media Division | In a world without fences, who needs
Commercial Dynamics Pty. Ltd. | Gates?
NSW, Australia |
------------------------------
Date: Sat, 20 Jan 2001 11:06:57 -0000
From: "Ian Waters" <ian@ianwaters.com>
Subject: Re: Perl script problem
Message-Id: <94bqr1$bgv$1@news6.svr.pol.co.uk>
I was under the impression that SPAM was unsolicited e-mails which were
advertising or selling something, as you will see from my post that I am not
selling anything, I am only asking a question about something I dont
understand. If it is too much trouble to post a decent response which
actually helps me then why bother wasting your time, if you have nothing
helpful to say then shut up. I apploigise about my poor subject line but
considering I have recivied around 8 responses, most more helpful than
yours, it could not have been that bad. I was under the impression that a
newsgroup was a place where people could ask questions and get sensible
answers not playground insults., it looks like I am very much mistaken.
John W. Krahn <krahnj@acm.org> wrote in message
news:3A68CA5F.E3CB00EA@acm.org...
> Ian Waters wrote:
> >
> > Bernard El-Hagin <bernard.el-hagin@lido-tech.net> wrote in message
> > news:slrn96g9an.2q0.bernard.el-hagin@gdndev25.lido-tech...
> > > On 18 Jan 2001 08:46:23 +0000, nobull@mail.com <nobull@mail.com>
wrote:
> > > >"Ian Waters" <ian@ianwaters.com> writes:
> > > >
> > > >> Subject: Perl script problem
> > > >
> > > >Please write out 1000 times: "I must not post to Usenet with
> > > >content-free subject lines".
> > >
> > > Change that to "Please write out 1000 times ON PAPER".
> > > It's too easy to do it electronically. :)
> >
> > Please write out a 1000 times, "I must work on my people skills and try
to
> > remeber that I do not own usenet."
>
> Please write out a thousand times (on paper) "I will not post Jeopardy
> style on Usenet."
>
> John
------------------------------
Date: Sat, 20 Jan 2001 04:08:01 -0600
From: "Rich H" <bigrich318@yahoo.com>
Subject: Re: PWS - perl (ATTN: cwrites)
Message-Id: <t6iond3mg21g05@corp.supernews.com>
<Jerry McEwen> wrote in message
news:248i6t8n8qjsq1nj8tuioo04u0tqtanudt@4ax.com...
> Sven, have you gotten this to work with PWS or did you go another
> route? I am running Win98SE with th NT 4.0 Option pack. I read the
> Active State stuff, but it is wrong; the options they mention in MMC
> are not correct.
>
> I found a place in the PWS 3.0 section that talks about the registry
> and that is wrong as well (probably a typo), but I figured out where
> they were talking about. I cannot, however, determine how to make
the
> extension in the registry. An example would be very handy, do you
have
> one? TIA.
Perl on PWS Win98se:
1.) Start > Run > REGEDIT
2.) HKEY_LOCAL_MACHINE > System > CurrentControlSet > Services > W3SVC
> Parameters > Script Map
3.)
Name Data
-------------------------------------------------
.cgi "c:\perl\bin\perl.exe %s %s"
.pl "c:\perl\bin\perl.exe %s %s"
.plx "c:\perl\bin\perl.exe %s %s"
------------------------------
Date: Sat, 20 Jan 2001 11:45:23 +0000
From: James Taylor <james@NOSPAM.demon.co.uk>
Subject: Re: Suppressing stderr on `` commands
Message-Id: <ant2011231cbfNdQ@oakseed.demon.co.uk>
In article <slrn96hdvs.8eu.tadmc@tadmc26.august.net>, Tad McClellan
<URL:mailto:tadmc@augustmail.com> wrote:
>
> 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 use my own RISC OS machine. Unfortunately, the guys who ported
Perl to RISC OS did not include perldoc.
> I do not know of any platforms where perl is available and
> perldoc is not available (since perldoc is written in perl).
Yes, I think someone pointed that out to me before, but I think
there was a problem and I can't remember exactly what it was now.
Perhaps it was that our port is not up to date enough. The RISC OS
port is at version 5.005_03 and although someone is working on a new
port there is no sign of it any time soon. RISC OS is very different
from operating systems you may have come across and the work of
porting Perl to it is non-trivial. I'm very grateful to have *any*
version of Perl so I'm not going to nag the porters just because they
didn't include a version of perldoc.
On the other hand maybe the issue with perldoc was how it accessed the
necessary documentation files. I suppose I could have a go at
modifying it to access the documentation in the manner in which it is
stored on RISC OS, but it has never seemed worthwhile because I can
use the HTML documentation directly in a browser. The downside being
that I cannot directly translate the perldoc references in this
newsgroup into a local URL into the HTML docs.
> 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.
Yes, we can always hope.
> Folks without easy access to Perl's standard docs get entries
> in config files, don't let that happen to you.
Well, as I say, I downloaded the docs in HTML format which are fairly
easy to access, I just don't have a working version of perldoc.
--
James Taylor <james (at) oakseed demon co uk>
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Sat, 20 Jan 2001 08:55:10 GMT
From: Sterling <smullett@omeninc.com>
Subject: Words in Perl - Pulling Hair
Message-Id: <3A69528A.98A3836C@omeninc.com>
H-
I'm attempting to use the 'words' feature for perl.
The documentation says do this.
words [-w word-file] [-m min-length] <letters>
It says that by default words looks for a 'wordlist' in the directory of
execution. So I created a ln -s to a word list on the machine under the
/usr/share/dict/ directory.
Here's the problem. It errors.
$symbol = "RXSN"; # I've changed this to match the error presented
below.
$stuff = words $symbol;
print "SYMBOL: $symbol - $stuff \n";
Actually this is just outside a loop that changes $symbol with each loop
to a random set of letters.
Here's the strange part. It's trying to determine an object from the
$symbol variable.
Can't locate object method "words" via package "RXSN" at ./perl_code.pl
line 18.
SYMBOL: RXSN -
Now maybe I'm mis-reading the documentation but why won't this work? I'm
not setting the word-file because it's in the current directory and I
don't set a minium length so it will choose all words and assign to
$stuff.
When I do this
print words $symbol;
It returns nothing.
Perhaps some kind person could enlighten me on what this words is
suppose to do?
I wish that documentation came with examples of actual usage instead of
the minimilistic set of defined parameters. Should I surround the
letters with < > or is that just a documentation convention? It throws
errors when tried. 8^(
Anywho this is very frustrating. If any one has any insights into
'words' I'd appreciate the assist.
Thanks.
Thoughts, Comments, Anecdotes ?
-Sterling
------------------------------
Date: Sat, 20 Jan 2001 13:35:46 GMT
From: gnari@my-deja.com
Subject: Re: Words in Perl - Pulling Hair
Message-Id: <94c47i$fun$1@nnrp1.deja.com>
In article <3A69528A.98A3836C@omeninc.com>,
Sterling <smullett@omeninc.com> wrote:
> H-
>
> I'm attempting to use the 'words' feature for perl.
> The documentation says do this.
> words [-w word-file] [-m min-length] <letters>
>
I am afraid I have no idea what you are talking about.
what documentation are you referring to?
I looks like 'words' is some sort of command line utility. where does
it come from? is it a perl program?
>
> Here's the problem. It errors.
> $symbol = "RXSN"; # I've changed this to match the error presented
> below.
> $stuff = words $symbol;
here you are behaving as if words is a perl function.
maybe you want to use backquotes or qx
$stuff = qx(words $symbol);
although you should maybe supply full pathname of 'words'
>
> Here's the strange part. It's trying to determine an object from the
> $symbol variable.
> Can't locate object method "words" via package "RXSN" at
./perl_code.pl
not so strange.
$a= b c;
is equivalent to
$a=c::b;
if you are interested in modules and packages, you might look at
perldoc perlmod
>
> When I do this
> print words $symbol;
> It returns nothing.
>
here you are printing $symbol to file handle 'words'
as you probably did not open such a handle, the output is sinked
> Perhaps some kind person could enlighten me on what this words is
> suppose to do?
maybe, but my guess it has nothing to do with perl.
gnari
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Sun, 21 Jan 2001 00:54:50 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Words in Perl - Pulling Hair
Message-Id: <slrn96j65a.bgr.mgjv@martien.heliotrope.home>
On Sat, 20 Jan 2001 08:55:10 GMT,
Sterling <smullett@omeninc.com> wrote:
> H-
>
> I'm attempting to use the 'words' feature for perl.
> The documentation says do this.
> words [-w word-file] [-m min-length] <letters>
I just grepped through the documentation set for perl 5.6.0, thinking
that I missed something new, without finding a reference to this
'feature' or command or tool. What is this thing, and what is it
supposed to do?
As far as I can tell it's something from some module or something?
> It says that by default words looks for a 'wordlist' in the directory of
> execution. So I created a ln -s to a word list on the machine under the
> /usr/share/dict/ directory.
>
> Here's the problem. It errors.
> $symbol = "RXSN"; # I've changed this to match the error presented
> below.
> $stuff = words $symbol;
> print "SYMBOL: $symbol - $stuff \n";
[snip of too much verbiage]
> Can't locate object method "words" via package "RXSN" at ./perl_code.pl
> line 18.
> SYMBOL: RXSN -
Is this the error message you were talking about above? In that case:
The line
$stuff = words $symbol;
Will only be interpreted as a subroutine call if the subroutine words
has been defined earlier during the execution of the program, either by
a full definition, a predeclaration or an importation. if it's
going to be declared later on, it's too late. In the absence of a
seen sub with the name words, perl will interpret that line as an
indirect reference to the sub words in the package $symbol.
The solution is to make sure that the sub is declared before you reach
that line, _or_ to use parentheses:
$stuff = words($symbol);
Did you remember to use the module or require the library earlier in
the program?
> Now maybe I'm mis-reading the documentation but why won't this work? I'm
> not setting the word-file because it's in the current directory and I
> don't set a minium length so it will choose all words and assign to
> $stuff.
The perlsub documentation as something to say about this.
Nothing that I know of has anything to say about the words feature
though...
Martien
--
Martien Verbruggen |
Interactive Media Division | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd. | make up 3/4 of the population.
NSW, Australia |
------------------------------
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 105
**************************************