[22543] in Perl-Users-Digest
Perl-Users Digest, Issue: 4764 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 26 06:34:47 2003
Date: Wed, 26 Mar 2003 03:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 26 Mar 2003 Volume: 10 Number: 4764
Today's topics:
Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisne <bigj@kamelfreund.de>
Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisne (Rod)
Re: Can't locate object method "new" via package "Net:: (Anno Siegel)
Re: CGI.pm or roll-your-own? <me@privacy.net>
Re: CGI.pm or roll-your-own? (Helgi Briem)
Re: CGI.pm or roll-your-own? <me@privacy.net>
Database Application Development with Perl / Gtk / Tk (Bharat Pondugula)
Re: Database Application Development with Perl / Gtk / <tassilo.parseval@rwth-aachen.de>
Re: Editor with Perl as macro language? <nwzmattXX@XXnetscape.net>
Re: Editor with Perl as macro language? <Norbert_Schmidt@DU3.MAUS.DE>
howto use shared object c++ libs from perl on linux? <henri.schomaecker@virtual-homes.de>
Installing ActivePerl5.8.0 <samj@austarmetro.com.au>
Re: Installing ActivePerl5.8.0 <nwzmattXX@XXnetscape.net>
Re: Installing ActivePerl5.8.0 <me@privacy.net>
Re: Is there one module for 'rcp'? (Anno Siegel)
Re: Learning Perl <please@no.spam>
Modules and the Artistic License <please@no.spam>
Re: Modules and the Artistic License <please@no.spam>
Re: Newbie: how to use fork and daemonize in CGI scrip <minceme@start.no>
Re: Perl to parse C++ code?? <ron@savage.net.au>
Re: Possible Storable 2.06 bug with CODE refs that use <nix-razor-pit@esperi.demon.co.uk>
Re: Possible Storable 2.06 bug with CODE refs that use <nix-razor-pit@esperi.demon.co.uk>
Simple CGI Select by Date (John South)
Re: Turning a Perl script into a binary executable? <goldbb2@earthlink.net>
Re: Turning a Perl script into a binary executable? <please@no.spam>
Re: Turning a Perl script into a binary executable? <bigj@kamelfreund.de>
Re: Turning a Perl script into a binary executable? <simon.andrews@bbsrc.ac.uk>
Re: WWW::Mechanize newbie question <MichaelRunningWolf@att.net>
Re: WWW::Mechanize newbie question <kellygreer1@hell.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 26 Mar 2003 10:36:16 +0100
From: "Janek Schleicher" <bigj@kamelfreund.de>
Subject: Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
Message-Id: <pan.2003.03.26.09.36.15.12788@kamelfreund.de>
Rod wrote at Tue, 25 Mar 2003 17:11:12 -0800:
> @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
As Benjamin already said, glob is your friend.
However, you should note that the backticks returns
in scalar context a string with all the multilines of the output,
while in list context it returns a list consisting of the lines of the
output.
Thus it is unnecessary to split the result of the backticks to gain the
different lines,
just use
my @array = `...`;
instead of my @array = split /\n/, `...`;
Greetings,
Janek
------------------------------
Date: 26 Mar 2003 02:52:54 -0800
From: headline@volcanbaru.com (Rod)
Subject: Re: @statarray = split /\n/,`dir c:\\seismo\\miniseisnet\\*.station /b`;
Message-Id: <3259955e.0303260252.2838cfe7@posting.google.com>
Benjamin Goldberg <goldbb2@earthlink.net> wrote in message news:<3E812B6D.9F11E87E@earthlink.net>...
> Try:
> @statarray = glob("C:/seismo/miniseisnet/*.station");
Yes, this does work and by doing a foreach over the array can remove
the unwanted bits. But now I have to learn about glob :)
I ended up with:
opendir thisdir, 'c:\\seismo\miniseisnet\\';
@array = grep { $_ =~ /\.station/} readdir thisdir;
close thisdir;
I guess my biggest question is why it work on one computer and not on
another. I was hoping that this code would be portable at least
between windows machines.
regards, rod
------------------------------
Date: 26 Mar 2003 09:38:26 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Can't locate object method "new" via package "Net::FTP::A" at /usr/perl5/5.00503/sun4-solaris/IO/Socket.pm line 253.
Message-Id: <b5rsei$qpu$1@mamenchi.zrz.TU-Berlin.DE>
Leo <leo_lu@tce.com.tw> wrote in comp.lang.perl.misc:
> Hi All,
>
> Could anyone can tell me what's the problem with this NET:FTP::A ?
Apparently the module is not loaded.
> And what is the correct method to install Perl Module?
use CPAN:
perl -MCPAN -e shell
Then type "install NET:FTP::A", for instance.
Anno
------------------------------
Date: Wed, 26 Mar 2003 19:29:05 +1100
From: "Tintin" <me@privacy.net>
Subject: Re: CGI.pm or roll-your-own?
Message-Id: <b5rocg$2cfpva$1@ID-172104.news.dfncis.de>
"Tore Aursand" <tore@aursand.no> wrote in message
news:pan.2003.03.25.22.53.55.107913@aursand.no...
> On Wed, 26 Mar 2003 08:39:36 +1100, Tintin wrote:
> >> I've been working unsuccessfully at write a short subroutine that will
> >> detect whether the CGI input is GET or POST, process the data
> >> accordingly, and then allow the calling script to use the values. This
> >> subroutine could then be called by the various CGI scripts we use on
> >> our site.
> >>
> >> My inability to make such a simple subroutine work has lead me to
> >> wonder if I should invest the time in attempting to learn how to use
> >> CGI.pm.
> >>
> >> If the group would be so kind, are the benefits of CGI.pm worth the
> >> overhead?
>
> > Well, post your parsing code and we'll tell you where it is broken and
> > insecure.
>
> Should we really do that, or should we tell him to use CGI.pm? I've
> looked a bit into CGI.pm, and managed to make it slightly "lighter", but
> that doesn't mean that one shouldn't use CGI.pm in the first place.
I find that most people think, "how hard can it be?"
They find their hand rolled code seems to work for all the situations they
use it in, so they assume it works well for all situations.
------------------------------
Date: Wed, 26 Mar 2003 10:31:01 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: CGI.pm or roll-your-own?
Message-Id: <3e817fe5.4055961764@news.cis.dfn.de>
On Wed, 26 Mar 2003 19:29:05 +1100, "Tintin"
<me@privacy.net> wrote:
>> Should we really do that, or should we tell him to use CGI.pm? I've
>> looked a bit into CGI.pm, and managed to make it slightly "lighter", but
>> that doesn't mean that one shouldn't use CGI.pm in the first place.
>
>I find that most people think, "how hard can it be?"
>
>They find their hand rolled code seems to work for all the situations they
>use it in, so they assume it works well for all situations.
But "why?" Why do people, beginners no less, constantly
want to write this themselves when using the CGI module
is almost infinitely easier (not to mention better).
This applies not only to CGI.pm, but to modules in
general. Why are so many people reluctant to
use modules? It puzzles me.
Would the same people insist on writing a custom
printer driver for every piece of software they use?
Why not use the ones that come with your OS?
Does every Java programmer go around writing
the swing library from scratch?
Do C++ programmers start out writing the
equivalent of the STL before writing a program?
Are C programmers too proud to start their programs
with #include stdio.h and insist on writing
it themselves?
What is wrong with people?
--
Regards, Helgi Briem
helgi DOT briem AT decode DOT is
------------------------------
Date: Wed, 26 Mar 2003 22:31:04 +1100
From: "Tintin" <me@privacy.net>
Subject: Re: CGI.pm or roll-your-own?
Message-Id: <b5s31m$2d7b22$1@ID-172104.news.dfncis.de>
"Helgi Briem" <helgi@decode.is> wrote in message
news:3e817fe5.4055961764@news.cis.dfn.de...
> On Wed, 26 Mar 2003 19:29:05 +1100, "Tintin"
> <me@privacy.net> wrote:
>
> >I find that most people think, "how hard can it be?"
> >
> >They find their hand rolled code seems to work for all the situations
they
> >use it in, so they assume it works well for all situations.
>
> But "why?" Why do people, beginners no less, constantly
> want to write this themselves when using the CGI module
> is almost infinitely easier (not to mention better).
I suspect it is because there are so many existing scripts and tutorials
that don't use the CGI module.
Also there is a lot of FUD about the overhead of using modules.
>
> This applies not only to CGI.pm, but to modules in
> general. Why are so many people reluctant to
> use modules? It puzzles me.
Speaking personally, I tried to avoid using non-standard modules in my
software that I distributed, as I found that beginners would get very stuck
trying to install a required module. However, I changed my mind on that
one, and just include local copies on the modules my software uses.
Sure it makes the distribution a bit bigger, but it certainly makes
development much easier.
------------------------------
Date: 25 Mar 2003 23:33:59 -0800
From: bharat@ZONNET.NL (Bharat Pondugula)
Subject: Database Application Development with Perl / Gtk / Tk
Message-Id: <f0687d72.0303252333.111fdcdf@posting.google.com>
Good morning all,
I am looking for guidance regarding the above subject. I am planning
to build an application (pretty database intensive about a million
records ) with GUI frontend in either PERL GTK or PERL TK. Do you
think that the application will be fast enough.
Thanks in adavance
Bharat Pondugula
------------------------------
Date: 26 Mar 2003 09:30:27 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Database Application Development with Perl / Gtk / Tk
Message-Id: <b5rrvj$3mv$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Bharat Pondugula:
> I am looking for guidance regarding the above subject. I am planning
> to build an application (pretty database intensive about a million
> records ) with GUI frontend in either PERL GTK or PERL TK. Do you
> think that the application will be fast enough.
Possibly...at least as long Perl is concerned. I was lately working with
a larger database (initially mysql). It turned to be out that Perl was
always much quicker than the underlying database and was most of the
time waiting for mysql to finish its queries.
To make the overall application quick enough you likely need some
optimization strategies. That's database-dependent. For instance, mysql
can be sped up on UPDATEs if you make a lot of them in a row instead of
mixing them with SELECTs. Consult the documentation of your database for
such matters.
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: Wed, 26 Mar 2003 05:46:07 GMT
From: Matt <nwzmattXX@XXnetscape.net>
Subject: Re: Editor with Perl as macro language?
Message-Id: <u1y0ulu9g.fsf@XXnetscape.net>
Norbert Schmidt <Norbert_Schmidt@DU3.MAUS.DE> writes:
<snip>
> I was dreaming of an editor that I can customize by simply writing
> packages that inherit from basic editor classes. And I would just have
> to override some methods or write new ones and assign them to keys.
> And bind such a substitute class to buffers or file types. Or
> something like that. I.e. I'ld really like something vaguely like
> emacs, but based on perl. :-)
>
> But I'ld settle for an editor where I can assign perl functions to
> keys and maybe replace built in functions by own versions.
I found something you might be interested in(I know I am). A quick
search on CPAN led me to Emacs-EPL. It contains three modules:
- Emacs Redefine Perl's system primitives to work inside of Emacs
- Emacs::EPL Protocol implementation and data conversions for Emacs Perl
- Emacs::Lisp Support for writing Emacs extensions in Perl
The description for Emacs::Lisp reads:
Emacs allows you to customize your environment using Lisp. With EPL,
you can use Perl, too. This module allows Perl code to call functions
and access variables of Lisp.
There is no ppm package for it(I assume you are running AS Perl since
you are using Windows) - at least not for the version I'm
running(5.6.1) - but it make's and installs fine using nmake .
I'm running GNU Emacs 21.2.1 on Win2K. The docs say it will work in
XEmacs as well.
Matt
--
Remove the X's to reply directly.
------------------------------
Date: Wed, 26 Mar 2003 10:21:29 +0100
From: Norbert Schmidt <Norbert_Schmidt@DU3.MAUS.DE>
Subject: Re: Editor with Perl as macro language?
Message-Id: <9sq28vkfntvc4h52jaef536huf7q3aroko@4ax.com>
Hello Matt,
>I found something you might be interested in(I know I am). A quick
>search on CPAN led me to Emacs-EPL. It contains three modules:
I've seen it and thought about it. The author seems to have lost
interrest (no change for 2 years), with lots of problems documented.
Right now the package "Prima" looks interesting to me. Maybe I'll use
it as the base for a native Perl IDE.
Regards, Norbert
------------------------------
Date: Wed, 26 Mar 2003 10:12:18 +0100
From: Henri =?ISO-8859-1?Q?Schom=E4cker?= <henri.schomaecker@virtual-homes.de>
Subject: howto use shared object c++ libs from perl on linux?
Message-Id: <b5rtfg$icd$04$1@news.t-online.com>
Hi folks,
I have a very big application written in perl and would like to use some of
my shared object c++ libs (.so) with it and would like to replace the
perl-code part by part by c++.
Is this possible and if yes, how? (I think on a win32 system I can use the
win32::API for it, right?)
If you have done that before, I'd be very thankful for some hints how to
avoid common mistakes etc.
Many thanks in advance,
yours Henri
--
| Henri Schomäcker - VIRTUAL HOMES
| Datendesign für Internet und Intranet
| henri.schomaecker_at_virtual-homes.de
| http://www.virtual-homes.de
| Public Key: /.gnupg/public_key.txt
--
------------------------------
Date: Wed, 26 Mar 2003 05:59:18 GMT
From: "Sam Jesse" <samj@austarmetro.com.au>
Subject: Installing ActivePerl5.8.0
Message-Id: <3e8141ad@news.comindico.com.au>
Hello
after I unistalled ActivePerl I tried to reinstall it but it gives me an
Installation Error saying Install location C:\Perl\ already exists. Please
select a new directory for isntalltion. I would like to install in under the
Perl directory and don't know what to do in this case
thanks
Sam
------------------------------
Date: Wed, 26 Mar 2003 08:18:11 GMT
From: Matt <nwzmattXX@XXnetscape.net>
Subject: Re: Installing ActivePerl5.8.0
Message-Id: <u1y0uvh75.fsf@XXnetscape.net>
"Sam Jesse" <samj@austarmetro.com.au> writes:
> Hello
> after I unistalled ActivePerl I tried to reinstall it but it gives me an
> Installation Error saying Install location C:\Perl\ already exists. Please
> select a new directory for isntalltion. I would like to install in under the
> Perl directory and don't know what to do in this case
>
> thanks
> Sam
>
>
Delete the directory and try again.
--
Remove the X's to reply directly.
------------------------------
Date: Wed, 26 Mar 2003 19:31:42 +1100
From: "Tintin" <me@privacy.net>
Subject: Re: Installing ActivePerl5.8.0
Message-Id: <b5rohd$2deu1v$1@ID-172104.news.dfncis.de>
"Sam Jesse" <samj@austarmetro.com.au> wrote in message
news:3e8141ad@news.comindico.com.au...
> Hello
> after I unistalled ActivePerl I tried to reinstall it but it gives me an
> Installation Error saying Install location C:\Perl\ already exists. Please
> select a new directory for isntalltion. I would like to install in under
the
> Perl directory and don't know what to do in this case
Pretty obvious, I would have thought.
Either delete or rename C:\Perl
------------------------------
Date: 26 Mar 2003 09:44:02 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Is there one module for 'rcp'?
Message-Id: <b5rsp2$qpu$2@mamenchi.zrz.TU-Berlin.DE>
Franklin Lee <pengtaoli@hotmail.com> wrote in comp.lang.perl.misc:
> Hello All,
>
> I find there has the module for 'rsh', but can't find
> the module for 'rcp'.
>
> Do you know there has the module for 'rcp'?
Apparently not, but there is File::Rsync.
You should learn to search the CPAN. See, for instance
http://theoryx5.uwinnipeg.ca/CPAN/cpan-search.html.
Anno
------------------------------
Date: Wed, 26 Mar 2003 08:53:17 +0000
From: Chris Lowth <please@no.spam>
Subject: Re: Learning Perl
Message-Id: <XUdga.452$8s6.6604@newsfep4-glfd.server.ntli.net>
Tad McClellan wrote:
> Why are you recommending books to Abigail?
Woops! I must have clicked "reply" on wrong posting - sorry. I meant to
recommend to OP.
> Abigail did not ask about books.
True (see above), but OP did.
> What do those books have to do with understanding why you would
> choose one language over another?
Nothing, I agree! - But I was answering OP's question 2. "What is a good
book/books and what is the most effective way to teach myself Perl."
> If you meant to recommend those books to the OP, then:
> 1) you should have made a followup to the OP rather than to Abigail
Agreed - my mistake! - I am wearing sack-cloth and ashes even as I type.
> 2) those books are NOT appropriate for Perl beginners
That depends - they were where my team and I started - but then our history
was with 20+ years of C and unix - it all depends on the starting point. I
take your point though - for a total novice they start too deep. For
someone transferring from another language they're fine (they were for me,
anyway).
Chris
--
My real address is: chris at lowth dot sea oh em
-> OpenSource e-mail virus protection : http://protector.sourceforge.net
-> iptables configuration wizards : http://www.lowth.com/LinWiz
------------------------------
Date: Wed, 26 Mar 2003 09:49:55 +0000
From: Chris Lowth <please@no.spam>
Subject: Modules and the Artistic License
Message-Id: <0Kega.483$8s6.6773@newsfep4-glfd.server.ntli.net>
Am I right in my understanding that: All the modules bundled with the perl
distributions are covered by the Artistic license (as per the language
itself)?
And that: Other modules available on CPAN, but not part of the main release
package can choose any alternative license they wish (eg: GPL).
And that: Modules I write for a paying customer (and hence will never be
available publicly) do not themselves have to be covered by either the GPL
or ASL - even if they make use of "distribution" and "CPAN" modules that
are.
Chris
--
My real address is: chris at lowth dot sea oh em
-> OpenSource e-mail virus protection : http://protector.sourceforge.net
-> iptables configuration wizards : http://www.lowth.com/LinWiz
------------------------------
Date: Wed, 26 Mar 2003 09:55:31 +0000
From: Chris Lowth <please@no.spam>
Subject: Re: Modules and the Artistic License
Message-Id: <gPega.486$8s6.6773@newsfep4-glfd.server.ntli.net>
Chris Lowth wrote:
> Am I right in my understanding that: All the modules bundled with the perl
> distributions are covered by the Artistic license (as per the language
> itself)?
>
> And that: Other modules available on CPAN, but not part of the main
> release package can choose any alternative license they wish (eg: GPL).
>
> And that: Modules I write for a paying customer (and hence will never be
> available publicly) do not themselves have to be covered by either the GPL
> or ASL - even if they make use of "distribution" and "CPAN" modules that
> are.
>
> Chris
Correction: for "ASL" read "PAL" (Perl Artistic License)!
--
My real address is: chris at lowth dot sea oh em
-> OpenSource e-mail virus protection : http://protector.sourceforge.net
-> iptables configuration wizards : http://www.lowth.com/LinWiz
------------------------------
Date: Wed, 26 Mar 2003 06:47:15 +0000 (UTC)
From: Vlad Tepes <minceme@start.no>
Subject: Re: Newbie: how to use fork and daemonize in CGI script
Message-Id: <b5ridi$2i0$1@troll.powertech.no>
* Kathryn had problems when uploading files to a CGI-script:
...
> The problem we are having is if a customer loses his connection during
> file upload, the entire script fails.
...
> I tried to make the upload a child process within a fork, but
> I haven't figured out how to make it so that the parent containing the
> emails, text file and html page completes whether or not the child
> fails.
Why do you need to fork? Assuming you're using CGI.pm, what you try to
do should be possible without forking?
[ snippet from CGI.pm : ]
There are occasionally problems involving parsing the
uploaded file. This usually happens when the user presses
"Stop" before the upload is finished. In this case, CGI.pm
will return undef for the name of the uploaded file and set
I<cgi_error()> to the string "400 Bad request
(malformed multipart POST)". This error message is designed
so that you can incorporate it into a status code to be sent
to the browser. Example:
$file = $query->upload('uploaded_file');
if (!$file && $query->cgi_error) {
print $query->header(-status=>$query->cgi_error);
exit 0;
}
--
Vlad
------------------------------
Date: Wed, 26 Mar 2003 18:49:31 +1100
From: "Ron Savage" <ron@savage.net.au>
Subject: Re: Perl to parse C++ code??
Message-Id: <b5rm6e$13gd$1@arachne.labyrinth.net.au>
"Michael P. Broida" <michael.p.broida@boeing.com> wrote in message
news:3E809F78.4DC4A462@boeing.com...
> Hi!
> I'm trying to setup a Perl tool that will parse some of our C++ code
http://starship.python.net/~tbryan/PERCEPS/
------------------------------
Date: 26 Mar 2003 08:31:33 +0000
From: Nix <nix-razor-pit@esperi.demon.co.uk>
Subject: Re: Possible Storable 2.06 bug with CODE refs that use modules
Message-Id: <87n0jio7fe.fsf@amaterasu.srvr.nix>
On Sun, 23 Mar 2003, Benjamin Goldberg moaned:
> Nix wrote:
> [snip]
>> | my $code = sub { use POSIX qw (getuid); getuid; };
>
> Try instead:
> my $code = sub { use POSIX (); POSIX::getuid; };
>
> [untested]
I tested it; same symptoms, pretty much. Anno's explanation is
convincing.
--
#ifdef USE_ISPTS_FLAG
} else { /* else pty, not pts */
#endif
------------------------------
Date: 26 Mar 2003 08:37:22 +0000
From: Nix <nix-razor-pit@esperi.demon.co.uk>
Subject: Re: Possible Storable 2.06 bug with CODE refs that use modules
Message-Id: <87isu6o75p.fsf@amaterasu.srvr.nix>
On 23 Mar 2003, Anno Siegel said:
> Note that "use POSIX ..." happens at compile time, it leaves no traces
> in the compiled code. If you try to thaw and execute the code in another
> process, POSIX will not be loaded and the call will fail. I'm not sure
> why it fails in your situation (where POSIX happens to be loaded).
I think it's confusing AUTOLOAD; I'm not sure *why*, though.
(Obviously it also fails when I thaw and execute... same symptoms, too.)
> Rewrite the code so that it loads POSIX at run time, if necessary:
>
> my $code = sub { require POSIX; POSIX->import( qw (getuid)); getuid() };
>
> This works as expected, and it may continue to work when the code is sent
> to another process.
Tested; with the multiple other stupid syntax errors in my testcase fixed,
it works.
>> Instead of the expected result (my UID) I get this:
>>
>> Can't locate auto/Storable/getuid.al in @INC (@INC contains:
>> /usr/lib/perl5/5.8.0/sparc-linux-thread-multi-64int /usr/lib/perl5/5.8.0
>> /usr/lib/perl5/site_perl/5.8.0/sparc-linux-thread-multi-64int
>> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at (eval 7)
>> line 3
>
> I'm not sure why it doesn't find getuid.al in auto/POSIX, but even if it
> did, the problem with another process not knowing about POSIX would remain.
Quite so. Thank you!
--
#ifdef USE_ISPTS_FLAG
} else { /* else pty, not pts */
#endif
------------------------------
Date: 26 Mar 2003 00:48:41 -0800
From: jsouth@cix.co.uk (John South)
Subject: Simple CGI Select by Date
Message-Id: <d2aa22df.0303260048.71219bc4@posting.google.com>
I've little experience of CGI and Perl, but I need a script that will
build a Web page taking mostly static html, and selecting some table
data from a text (or xml) file based on a date field (or equivalent
numeric field).
It's just a list of avaiable recruitment jobs that needs to only show
those before the interview date.
I'm sure this is possible and probably very easy. Can someone show me
a nice simple routine?
Cheers
John South
JS Associates
Pangbourne UK
------------------------------
Date: Wed, 26 Mar 2003 01:12:44 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Turning a Perl script into a binary executable?
Message-Id: <3E8144DC.350DBB72@earthlink.net>
Pat Li wrote:
>
> Is it possible to turn a perl script into a binary executable?
> Basically I have created a script that people are going to use but I
> don't want them to read the source code of it.
>
> Is this possible?
Yet another utility for doing this, in addition to those mentioned, is
the "pp" program, in the PAR-0.66 distribution.
--
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}
------------------------------
Date: Wed, 26 Mar 2003 08:44:32 +0000
From: Chris Lowth <please@no.spam>
Subject: Re: Turning a Perl script into a binary executable?
Message-Id: <KMdga.448$8s6.6614@newsfep4-glfd.server.ntli.net>
Vlad Tepes wrote:
> * Pat Li:
>> Is it possible to turn a perl script into a binary executable?
>> Basically I have created a script that people are going to use but I
>> don't want them to read the source code of it.
>>
>> Is this possible?
>
> Yes, here are some options:
>
> perlcc Malcolm Beatties free perlcompiler
> PerlApp Activestate
> perl2exe Indigostar
>
> If you are really embarrassed of your code, you could also encrypt it.
> Grab a sourcefilter from CPAN. And while your downloading:
> Send a grateful thought to the open-source community that has made all
> this possible...
>
> --
> Vlad
Interesting!
I've played with perlcc (various linux distros), and have never got it to
work on anything more challenging than a simple "hello world" script. Has
anyone got this to work on any heavy-weight projects, and if so - were
there any tricks to use or gotchas to overcome?
(I've had more success with perl2exe, BTW).
Chris
--
My real address is: chris at lowth dot sea oh em
-> OpenSource e-mail virus protection : http://protector.sourceforge.net
-> iptables configuration wizards : http://www.lowth.com/LinWiz
------------------------------
Date: Wed, 26 Mar 2003 10:37:20 +0100
From: "Janek Schleicher" <bigj@kamelfreund.de>
Subject: Re: Turning a Perl script into a binary executable?
Message-Id: <pan.2003.03.26.09.37.18.761332@kamelfreund.de>
Pat Li wrote at Tue, 25 Mar 2003 16:42:19 -0800:
> Is it possible to turn a perl script into a binary executable?
> Basically I have created a script that people are going to use but I
> don't want them to read the source code of it.
This is a FAQ.
Please read
perldoc -q hide
and
perldoc -q compile
Greetings,
Janek
------------------------------
Date: Wed, 26 Mar 2003 10:20:37 +0000
From: Simon Andrews <simon.andrews@bbsrc.ac.uk>
Subject: Re: Turning a Perl script into a binary executable?
Message-Id: <3E817EF5.2070601@bbsrc.ac.uk>
>>>Is it possible to turn a perl script into a binary executable?
>>>Basically I have created a script that people are going to use but I
>>>don't want them to read the source code of it.
>>>
>>>Is this possible?
>>
>>Yes, here are some options:
>>
>> perlcc Malcolm Beatties free perlcompiler
>> PerlApp Activestate
>> perl2exe Indigostar
> Chris Lowth wrote:
>
> Interesting!
>
> I've played with perlcc (various linux distros), and have never got it to
> work on anything more challenging than a simple "hello world" script. Has
> anyone got this to work on any heavy-weight projects, and if so - were
> there any tricks to use or gotchas to overcome?
>
> (I've had more success with perl2exe, BTW).
I've recently had good success with pp. This is a free application
based around the PAR module on CPAN. To quote from its documentation:
"DESCRIPTION
pp creates standalone executables from Perl programs, using the
compressed packager provided by the PAR manpage, and dependency
detection heuristics offered by the Module::ScanDeps manpage. Source
files are compressed verbatim without compilation.
You may think of pp as "perlcc that works without hassle". :-)"
It's still under development, and there are a couple of minor bugs to
work out, but for the most part it's ready to go. We have packaged up
fairly weighty PerlTk applications using pp, and all you have to then
distribute is the .exe and a perl dll.
The only changes I needed to make to the source was the addition of a
few extra use statements at the top where the dependancy scanning
routines failed to spot some modules loaded dynamically at run-time, but
I believe the same problems occur with perl2exe and the like.
Of course if you're only doing this to hide source code then none of
these options provides a real solution as with a bit of playing you can
unpack the source, but they make life much easier when distributing
applications to machines without perl installed.
Simon.
------------------------------
Date: 26 Mar 2003 06:21:29 GMT
From: "Michael R. Wolf" <MichaelRunningWolf@att.net>
Subject: Re: WWW::Mechanize newbie question
Message-Id: <b5rgt9$n5q$0@216.39.145.223>
"Kelly Greer" <kellygreer1@hell.rr.com> writes:
> hi newsgroup,
hi groupie.... :-)
> What do you have to do to be able to use the WWW::Mechanize Perl
> module on a windows machine? The current version from
> www.activestate.com doesn't seem to support this. Will this work on
> windows? Where do I get the code?
ActiveState may not have the latest version. You did not state what
version that is.
I had a problem with WWW::Mecahnize on my w2k box because it used some
module that had some XS code. The problm's been resolved with version
0.37 of WWW::Mechanize. I use it on my W2K box. Perhaps you need to
grab it from CPAN instead of ActionState.
Michael Wolf
--
Michael R. Wolf
All mammals learn by playing!
MichaelRunningWolf@att.net
------------------------------
Date: Wed, 26 Mar 2003 08:02:54 GMT
From: "Kelly Greer" <kellygreer1@hell.rr.com>
Subject: Re: WWW::Mechanize newbie question
Message-Id: <O8dga.7185$Qr.158784@twister.southeast.rr.com>
Thanks L D and Michael,
Great! I just got this to work. Yesterday, was my first day really working
with Perl. I'm not doing to bad. lol
Can you suggest a good sniffer program that I can use to see(sniff) what my
browser is sending to sites?
One that works on Win 2K SP2. I know I'll be working with some sites that
require an add_header call or two.
Thanks for your help,
Kelly Greer
kellygreer1@nospam.com
Change nospam to yahoo
"L D Jones" <45673&5@yahoo.co.uk> wrote in message
news:3E80FDBE.FBECB022@yahoo.co.uk...
> Kelly Greer wrote:
> >
> > hi newsgroup,
> >
> > What do you have to do to be able to use the WWW::Mechanize Perl module
on a
> > windows machine? The current version from www.activestate.com doesn't
seem
> > to support this. Will this work on windows? Where do I get the code?
>
> Get the code from CPAN
>
> What have you already tried? What do you mean by "the current version
> from www.activestate.com doesn't seem
> to support this?" The module is not installed with Activestate perl if
> that's what you mean
>
> I'm using Perl 5.8.0 with WWW::Mechanize on Windows now so it is
> certainly possible
------------------------------
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 4764
***************************************