[12729] in Perl-Users-Digest
Perl-Users Digest, Issue: 139 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 14 09:07:47 1999
Date: Wed, 14 Jul 1999 06:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 14 Jul 1999 Volume: 9 Number: 139
Today's topics:
Re: ** Working With Strings (Sitaram Chamarty)
cgi scripts on NT <Webdesigner@NewWebSite.com>
changing hash values <kevin.porter@fast.no>
Re: changing hash values (Mike Bristow)
Re: changing hash values <kevin.porter@fast.no>
Re: checking if variable is already a memeber of an arr (Sitaram Chamarty)
Re: document converter <thomas@bibsyst.no>
Re: How do I include a hash is a regular expression? <rick.delaney@home.com>
How to lock file <tcheeseo@starnet.gov.sg>
Re: Negation in regular expressions (Sitaram Chamarty)
Re: Newbie CGI query (Eric Bohlman)
Re: Newbie CGI query (Saku Ytti)
Newbie Help: How to display image on web page using Per <ray.ho@csdi.co.uk__anti_spaM>
Re: perl -e 'print "${\ord(s)}\n";' (Sitaram Chamarty)
perl script in browser? (Tan Keok San)
perl script in browser? (Tan Keok San)
Re: perl script in browser? <swiftkid@bigfoot.com>
Re: Problem with generate the return html for browser c (Eemu Bertling)
Re: Problem with generate the return html for browser c (A.J. Norman)
Re: Problem with MacPerl locating modules (Chris Nandor)
Re: Sending email by perl in NT <gellyfish@gellyfish.com>
Re: Simple Web Crawler??? <martin@adoma.se>
Re: Subroutine references and sort (A.J. Norman)
textedit text to html ... how to bodhyfryd@my-deja.com
Re: textedit text to html ... how to <steff.w@gordian.co.uk>
timeout problem <nicolabo@prof.it>
Re: translating carrage returns in CGI Forms (David Cantrell)
Re: What's faster: GDBM or Storable alexmc@my-deja.com
Re: Why Perl instead of ColdFusion? <gellyfish@gellyfish.com>
Re: Why Perl instead of ColdFusion? <martin@adoma.se>
Win32 on NT Question <kimntodd@dontspamus.execpc.com>
Re: Win32 Perl Editors <martin@adoma.se>
Re: Win32 Perl Editors (David Cantrell)
Re: Win32 Perl Editors <gellyfish@gellyfish.com>
Re: Win32 Perl Editors <rhrh@hotmail.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 14 Jul 1999 10:43:28 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: ** Working With Strings
Message-Id: <slrn7ond88.q2r.sitaram@diac.com>
On Mon, 12 Jul 1999 15:42:56 -0700, Victor <penpendisarapen@my-deja.com> wrote:
>How do I place each character in a string into an array?
>
>If I have this code:
>$mystring = "abcde";
>
>What do I do so I get this:
>
>$mylist[0] = "a"
>$mylist[1] = "b"
>$mylist[2] = "c"
>$mylist[3] = "d"
>$mylist[4] = "e"
perldoc -f split
>While I'm at it, how do I find the length of $mystring
Now I regret even answering this post. Oh well...
------------------------------
Date: Wed, 14 Jul 1999 11:52:55 GMT
From: Floyd Morrissette <Webdesigner@NewWebSite.com>
Subject: cgi scripts on NT
Message-Id: <7mhtml$fhv$1@nnrp1.deja.com>
I have been writing scripts for UNIX but I would like to learn the
differences for NT systems. Can somebody please tell me where to go to
read about this. All the books I have are geared for UNIX. I need one
for NT or perhaps a web site.
--
Get your web site from http://www.NewWebSite.com
Consultation is always free.
Help with cgi scripts.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 14 Jul 1999 13:16:54 +0100
From: kev <kevin.porter@fast.no>
Subject: changing hash values
Message-Id: <378C7FB6.4B7E55F9@fast.no>
Hi,
I have a HTML page with a form on it, which is POSTed to my Perl CGI
script.
In my script I convert the names and values into a hash so that I can
reference them by name.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# Make a hash out of the POSTed variables
$buffer2 = $buffer;
%pr = split( /[&=]/, $buffer2 );
This appears to work ok. I now want to write the values of the hash out
to a file, but they need decoding first, so I have:
foreach $val (values %pr)
{
$val =~ tr/+/ /;
$val =~ tr/\,/ /;
$val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
}
When I write out the values from the hash into a file, however, they
have not been decoded. I can see why (I guess $val is just a copy of a
hash value). So my question is, how do I decode the values of the hash
without having to manually do these three regex lines for each value?
thanks,
- Kev
------------------------------
Date: Wed, 14 Jul 1999 12:33:37 GMT
From: mike@fat.dotat.at (Mike Bristow)
Subject: Re: changing hash values
Message-Id: <slrn7op0t1.1kh.mike@lindt.fat.dotat.at>
On Wed, 14 Jul 1999 13:16:54 +0100, kev <kevin.porter@fast.no> wrote:
>foreach $val (values %pr)
>{
> $val =~ tr/+/ /;
> $val =~ tr/\,/ /;
> $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>}
#!/usr/bin/perl -w
use strict;
foreach my $key (keys %pr) {
$pr{$key} =~ s/foo/bar/g;
}
--
Mike Bristow, Geek-At-Large. GK/RM0501
one tequila - two tequila - three tequila - FLOOR !!!
------------------------------
Date: Wed, 14 Jul 1999 14:01:12 +0100
From: kev <kevin.porter@fast.no>
Subject: Re: changing hash values
Message-Id: <378C8A18.704D220E@fast.no>
> On Wed, 14 Jul 1999 13:16:54 +0100, kev <kevin.porter@fast.no> wrote:
> >foreach $val (values %pr)
> >{
> > $val =~ tr/+/ /;
> > $val =~ tr/\,/ /;
> > $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> >}
>
> #!/usr/bin/perl -w
> use strict;
>
> foreach my $key (keys %pr) {
> $pr{$key} =~ s/foo/bar/g;
> }
>
Thanks Mike, that worked a treat ( I had to change $key to $k for some reason, it kept
complaining that there was a missing
dollar on the loop variable or something). I also took out the 'my', cos I don't really
understand 'my' variables (yes, I have read the camel book, but I haven't spent a
great deal of time programming in Perl). Should I use the 'my'?
Thanks for the nifty code.
- Kev
------------------------------
Date: Wed, 14 Jul 1999 10:43:25 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: checking if variable is already a memeber of an array?
Message-Id: <slrn7oncuj.q2r.sitaram@diac.com>
On 13 Jul 1999 16:12:18 GMT, Flash Sheridan <flash@pobox.com> wrote:
>purposes. A high-level language is supposed to make such questionable
>decisions unnecessary, in favor of a standard, safe, and acceptably-
No. Most of us prefer TMTOWTDI over one-size fits all, which - if
you come right down to it - is what you are describing (even if
you didn't realise it)
Regards,
Sitaram
------------------------------
Date: Wed, 14 Jul 1999 12:30:17 +0200
From: Thomas Weholt <thomas@bibsyst.no>
Subject: Re: document converter
Message-Id: <378C66B9.6F86E673@bibsyst.no>
Hi,
I`m not sure but converting MS Word documents using a plain perl script
might be hard. Word-documents are
stored as compound-files, which is actually a big file containing several
other files, like pictures, text etc.
I think it would be easier to convert files like rtf, which is stored as
plain text. You have to get the info from the word-file
on how the internal data is stored before you can retrieve any info from
them. All other examples I`ve seen in other
programming languages, mainly Delphi on Windows NT/98, has used
Win32API-calls to read the files, and no hardcore
Delphi-coding, so "decoding" Word-files might mean you have to dig deep
into Win32API-theory or read a bunch of
documents just to get the overview of things. The documentation for RTF,
which is a considerably less complicated
format than Word, is around 500 pages of crap, so ... get ready for
paper-jam in the printer.
Look for a module to Perl, or some other program on unix that can convert
Word-files to html or some other format which
is easier to process using perl etc.
Anyhu, if you succed in decoding Word-files and use it in some fashion or
other with perl, please let us know.
Thomas
Josh Suarez wrote:
I need a program which can convert word documents (and perhaps other
> formats) to text files, while retaining some indicator of which words
> were originally bold and italic. The program needs to run on unix. Has
> anyone seen something like this? A perl script perhaps?
> Thanks,
> Jim
--
<----0000o--[(.)-(.)]---o0000-----------------<<
Thomas Weholt | Consequence, -
thomas@bibsyst.no | now the panic comes.
>>-----------=======---------- Support Linux -->
------------------------------
Date: Wed, 14 Jul 1999 11:33:27 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: How do I include a hash is a regular expression?
Message-Id: <378C7555.2498265A@home.com>
Abigail wrote:
>
> Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMCXLII September
> MCMXCIII in <URL:news:7mgdvf$dg0$1@lublin.zrz.tu-berlin.de>:
> == Abigail <abigail@delanet.com> wrote in comp.lang.perl.misc:
> ==
> == >Someone emailed me that this works:
> == >
> == > m/(\S+)\s(?p{$job{$1}})/
> ==
> == Would that someone have said which version supports the (?p...)
> == sequence?
>
> The current version of Perl. 5.005, now in maintenance release 5.005_03.
Must be a little bit higher than that.
$ perl -e 'm/(\S+)\s(?p{$job{$1}})/'
/(\S+)\s(?p{})/: Sequence (?p...) not recognized
$ perl -v
This is perl, version 5.005_03 built for i586-linux
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Wed, 14 Jul 1999 19:59:02 +0800
From: Tan Chee Seong <tcheeseo@starnet.gov.sg>
Subject: How to lock file
Message-Id: <378C7B85.6EA955B9@starnet.gov.sg>
how can I exclusively lock a file in WinNT OS, can I use flock ? can I
have an example.
------------------------------
Date: Wed, 14 Jul 1999 10:43:30 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Negation in regular expressions
Message-Id: <slrn7onedr.q2r.sitaram@diac.com>
On Tue, 13 Jul 1999 21:09:23 GMT, nasenaffe@my-deja.com
<nasenaffe@my-deja.com> wrote:
>So it is possible that you find
>
>[text][text][text][te\][xt] in the text.
>
>So it should not split at \][.
In newer perls you have negative lookbehind; as a first
approximation try splitting on:
/(?<!\\)\]\[/
Then you also have to consider whether the \ itself may be
back-whacked (that is, something like
\\]
which really means that the ] is still valid in your context),
etc.
Friedl's book should have a good example of doing this, IIRC (and
I know I'm risking being jumped on by Ilya for mentioning it [1])
Sitaram
[1] Just kidding, Ilya :-)
------------------------------
Date: 14 Jul 1999 09:35:25 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Newbie CGI query
Message-Id: <7mhlkt$ffj@dfw-ixnews4.ix.netcom.com>
Saku Ytti (saku.news@ytti.net) wrote:
: That might not be correct, but I hope you got the idea.
Is this the new motto for c.l.p.m?
------------------------------
Date: 14 Jul 1999 09:55:02 GMT
From: saku.news@ytti.net (Saku Ytti)
Subject: Re: Newbie CGI query
Message-Id: <slrn7oonju.f2g.saku.news@ytti.net>
On 14 Jul 1999 09:35:25 GMT, Eric Bohlman <ebohlman@netcom.com> wrote:
>Saku Ytti (saku.news@ytti.net) wrote:
>: That might not be correct, but I hope you got the idea.
>
>Is this the new motto for c.l.p.m?
Well it actually worked, but the point is giving direct solution
isn't always the 'right thing to do'. Like the $_ / $foo error,
if the reader looked at the code and tried to figure out how
it works he would have spotted that and maybe learned a bit.
Rather than just stamping the code somewhere.
--
--ytti - ::3585:0512:1378
------------------------------
Date: Wed, 14 Jul 1999 13:59:48 +0100
From: "Ray Ho" <ray.ho@csdi.co.uk__anti_spaM>
Subject: Newbie Help: How to display image on web page using Perl
Message-Id: <7mi1km$s6r$1@newsreader1.core.theplanet.net>
Can someone point me to the right direction on how to get a perl script ran
as cgi bin to stream out the contents of an image file.
I know I first need to do something like
print "Content-type: image/jpeg\n\n";
How do I next stream the contents of the image out?
Many thanks.
Ray Ho
------------------------------
Date: Wed, 14 Jul 1999 10:43:32 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: perl -e 'print "${\ord(s)}\n";'
Message-Id: <slrn7onejv.q2r.sitaram@diac.com>
On Tue, 13 Jul 1999 17:16:53 -0400, Jeremy James <perly@ufl.edu> wrote:
>perl -e 'print "${\ord(u)}\n";'
>117
>perl -e 'print "${\ord(s)}\n";'
>Substitution pattern not terminated at -e line 1.
>
>can someone help me understand why the 's' is trying to start a
>substitution and how I can stop this from happening?
Yes. Always use "-w" - even on one-liners whose sole purpose is
to illustrate a bizarre problem you're having.
Try
perl -we 'print "${\ord(u)}\n";'
instead and all will be revealed. Even better:
perl -Mdiagnostics -we 'print "${\ord(u)}\n";'
HTH. HAND.
------------------------------
Date: 14 Jul 1999 10:20:17 GMT
From: ccetks@leonis.nus.edu.sg (Tan Keok San)
Subject: perl script in browser?
Message-Id: <7mho91$qor$1@nuscc.nus.edu.sg>
Got some .pl scripts with HTML tags. Problem: code compiles ok but shows
up in browser as statements from script with a mix of the HTML
tags...appreciate any help as to what's going on? Thanks.
------------------------------
Date: 14 Jul 1999 10:43:09 GMT
From: ccetks@leonis.nus.edu.sg (Tan Keok San)
Subject: perl script in browser?
Message-Id: <7mhpjt$r49$1@nuscc.nus.edu.sg>
Script compiles ok...but shows up in browser as a mixture of executed html
tags and text statements! Any help as to what's wrong appreciated?
------------------------------
Date: Wed, 14 Jul 1999 16:08:38 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: perl script in browser?
Message-Id: <7miue4$2c51@news.cyber.net.pk>
Tan Keok San <ccetks@leonis.nus.edu.sg> wrote in message
news:7mho91$qor$1@nuscc.nus.edu.sg...
: Got some .pl scripts with HTML tags. Problem: code compiles ok but shows
: up in browser as statements from script with a mix of the HTML
: tags...appreciate any help as to what's going on? Thanks.
get a webserver.
www.apache.org/dist/ -> free
------------------------------
Date: Wed, 14 Jul 1999 10:20:18 GMT
From: bera@kainuunet.fi (Eemu Bertling)
Subject: Re: Problem with generate the return html for browser client
Message-Id: <378c60d8.17810780@news.inet.fi>
>print("content-type:text\html\n\n");
print("content-type:text\\html\n\n");
T: Bera (Eemu Bertling)
------------------------------
Date: 14 Jul 1999 11:41:52 +0100
From: nja@le.ac.uk (A.J. Norman)
Subject: Re: Problem with generate the return html for browser client
Message-Id: <7mhphg$ras@harrier.le.ac.uk>
In article <378c60d8.17810780@news.inet.fi>, Eemu Bertling
<bera@kainuunet.fi> wrote:
>> print("content-type:text\html\n\n");
>
> print("content-type:text\\html\n\n");
print("Content-type: text/html\n\n");
I blame Microsoft myself...
--
Andrew Norman, Leicester, England
nja@le.ac.uk || andrew.norman@le.ac.uk
http://www.le.ac.uk/engineering/nja/
------------------------------
Date: Wed, 14 Jul 1999 12:54:02 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Problem with MacPerl locating modules
Message-Id: <pudge-1407990854070001@192.168.0.17>
In article <7me45r$ddv@pmgm.Stanford.EDU>, gcavet@pmgm.Stanford.EDU (Guy
Cavet) wrote:
# A basic problem with MacPerl - I couldn't find a MacPerl-specific
newsgroup but
# please feel free to redirect me if there's a more appropriate forum for this.
MacPerl mailing lists are at <URL:http://www.macperl.org>.
# I installed MacPerl and it runs just fine, except for loading modules
that came
# along with it. For example, trying to run One Liner results in the following:
#
# # Can't find loadable object for module Mac::Memory in @INC (Macintosh HD:\
# Applications:MacPerl:lib Dev:Pseudo)
# File 'Macintosh HD:Applications:MacPerl:lib:Mac:AppleEvents.pm'; line 773
# <etc. etc>
#
# Of course I have checked that the Memory module is indeed in
# Macintosh HD:Applications:MacPerl:lib:Mac and,
# as you can see, Macintosh HD:Applications:MacPerl:lib is in @INC.
# Also, Perl finds the AppleEvents module just fine and it's in the same
# directory as the Memory module. I suppose this could mean that there's
# something wrong with the Memory module files, but they're just as I
downloaded
# them...
# If it is relevant, I'm running Version 5.2.0r4 Patchlevel 5.004 on a 540c.
Paul got it right: a 540c (unless you've gotten a processor upgrade) is a
68K machine. You need to, after installing the main installer as you've
done, install either the cfm68k installer or the bigappl installer. Use
cfm68k if:
* You have Mac OS 8 or greater
* You have Mac OS 7.5.3 or greater, and CFM-68K Runtime Enabler
Both will allow you to use Mac::Memory, but only cfm68k will allow you to
install and use additional extension modules (compiled shared libraries),
because cfm68k allows dynamic loading on 68K machines and bigappl doesn't.
If you aren't sure what to install, get this standalone MacPerl program:
http://pudge.net/files/macperl/scripts/whichMacPerl/whichMacPerl.sit.bin
It will tell you what to install based on what it can find out about your
system. The source is included in the same directory.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: 14 Jul 1999 10:28:30 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Sending email by perl in NT
Message-Id: <378c583e@newsread3.dircon.co.uk>
Donna Walker <donnawalk@netscape.net> wrote:
> Hello group. I'm not a perl programmer but have need of a perl script
> similar to the one below. I need to send email with body text and an
> attachment (or two). Can anyone tell me the complete script to handle my
> wish?
>
As you are going to use MIME::Lite you will find an example in the
documentation. I cant send you a complete script because you havent
supplied anything approaching a complete specification. Have a look at the
documentation anmd then come back of you have any problems.
/J\
--
"Like Anne Robinson in a Korean restaurant, it'll be dog eat dog" -
Graham Norton
------------------------------
Date: Wed, 14 Jul 1999 11:56:08 +0100
From: Martin Quensel <martin@adoma.se>
Subject: Re: Simple Web Crawler???
Message-Id: <378C6CC8.46CFA0F6@adoma.se>
bandhunt wrote:
>
> I'm trying to build a simple web crawler.
> I need to know how I can get a document from a particular URL and save
> it to a database file on my server.
>
> Seems like it should be simple but I can't figure it out.
> Any help would be great,
> D.J.
It is simple.
use LWP::Simple, if you dont have it, download it and read the docs.
The database is something else..depends on what your using, and i dont
have a clue what database your using.
Cheers
Martin Quensel
------------------------------
Date: 14 Jul 1999 10:17:42 +0100
From: nja@le.ac.uk (A.J. Norman)
Subject: Re: Subroutine references and sort
Message-Id: <7mhkjm$avd@harrier.le.ac.uk>
In article <7mg0e4$cv1$1@lublin.zrz.tu-berlin.de>, Anno Siegel
<anno4000@lublin.zrz.tu-berlin.de> wrote:
> A.J. Norman <nja@le.ac.uk> wrote in comp.lang.perl.misc:
>
>> I find "use strict" mops up the overwhelming majority of the things
>> that might give -w hiccups, and the warnings left over are usually
>> about uninitialised variables and can often be safely ignored - the
>> -w flag rarely indicates the source of fatal errors in my
>> experience. I know it's a heresy, but I think the use of -w is
>> overrated.
>
> Oh, I don't know. It's probably a matter of style, but in my
> experience a warning about an uninitialized value is usually the
> sign of an oversight, which may or may not be harmless. In any case,
> it doesn't hurt to initialize to something reasonable. The cases
> where you do want to use an undefined value as another way of saying
> zero (e.g. $hash{ $key}++) are taken care of and don't generate
> warnings.
I can think of one case where this isn't true - assuming the function
"banana" can return either undef, "apple" or "orange", this will throw
a warning while running correctly when the return value is undef:
my $fruit = banana();
if ($fruit eq "apple")
{
...
}
I'd say that $fruit is definitely initialised here, even if it might
be initialised to undef.
> I tend to make my scripts -w-clean and keep -w switched on in
> production, so unexpected changes in data (say) have a chance to
> trigger a warning instead of silently giving wrong answers.
I'm not saying -w isn't useful or a good thing, but I'm rather
perplexed by the emphasis some people place on it rather than on "use
strict" (which in my opinion ought to be the default). "use strict"
is always the second thing I type in a script, but I generally add
the -w flag late in the day, and I'm usually pleasantly surprised by
how little it warns me about.
--
Andrew Norman, Leicester, England
nja@le.ac.uk || andrew.norman@le.ac.uk
http://www.le.ac.uk/engineering/nja/
------------------------------
Date: Wed, 14 Jul 1999 10:10:37 GMT
From: bodhyfryd@my-deja.com
Subject: textedit text to html ... how to
Message-Id: <7mhnmo$e19$1@nnrp1.deja.com>
Can anyone tell me if there is an easy way (i.e. is there a module or
something)to take the text in a textedit box and convert it to html so
that it can be displayed in a page exactly as the user entered it.
Just like this message will when it is viewed! .. with CR's and
spaces and tags such as <P>'s and
<br>'s etc.
OR would I have to write a converter of some kind (I hope and surely
not)?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 14 Jul 1999 11:48:26 +0100
From: Steff Watkins <steff.w@gordian.co.uk>
Subject: Re: textedit text to html ... how to
Message-Id: <378C6AFA.1F723409@gordian.co.uk>
bodhyfryd@my-deja.com wrote:
>
> Can anyone tell me if there is an easy way (i.e. is there a module or
> something)to take the text in a textedit box and convert it to html so
> that it can be displayed in a page exactly as the user entered it.
>
> Just like this message will when it is viewed! .. with CR's and
>
> spaces and tags such as <P>'s and
>
> <br>'s etc.
>
> OR would I have to write a converter of some kind (I hope and surely
> not)?
Hi,
if you know how to trap the input from the web browser, and how to un-CGI it
(using the 'unpack' statement), then why not just dump the data straight out
but put it between some <pre> </pre> (preformat) tags???
That should achieve what you're looking for.
Steff
--------------
Steff Watkins, Systems Administrator, Gordian Knot
Steff.Watkins@gordian.co.uk http://www.SteffWatkins.co.uk/
"The near impossible I can do today. The impossible takes a little longer."
------------------------------
Date: Wed, 14 Jul 1999 09:45:25 +0200
From: "Nicola" <nicolabo@prof.it>
Subject: timeout problem
Message-Id: <7mhfdi$o5c$1@serv1.iunet.it>
If I launch a perl script through a telnet window, it will be killed by the
cgi-timeout limit of the server if the time of its execution is major of it?
Note that it is a perl script that does not return html code. It only
updates a txt database.
Launching it as a crontab process is a method to avoid cgi-timeot limit?
Thank you.
Nicola Bonechi
------------------------------
Date: Wed, 14 Jul 1999 11:17:20 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: translating carrage returns in CGI Forms
Message-Id: <378f7186.410757938@news.insnet.net>
On Tue, 13 Jul 1999 07:25:05 -0700, lr@hpl.hp.com (Larry Rosler) said:
>> $myVariable=~s/\n/ /g;
>
>If doing it about an order of magnitude faster matters, then use:
>
> $myVariable =~ tr/\n/ /;
Oops!
Errm ... [hurriedly searches for excuse] ... if you need to handle Mac
or DOS text then use:
$myVariable=~s/[\n\r]/ /g;
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: Wed, 14 Jul 1999 10:40:55 GMT
From: alexmc@my-deja.com
To: stupid@pobox.com
Subject: Re: What's faster: GDBM or Storable
Message-Id: <7mhpfm$egs$1@nnrp1.deja.com>
In article <130719992239437576%stupid@pobox.com>,
Michael G Schwern <stupid@pobox.com> wrote:
> Now that I'm thinking, I'm going to send off some patches to Guru to
> get MLDBM to select its defaults more intellegently.
>
Thanks very much. I quite liked MLDBM when I have used it.
It seemed much simpler than trying to deal with DBI and MySQL.
I am surprised that more people don't use it...
Alex
--
Alex McLintock http://www.arcfan.demon.co.uk/sf/books/ SF REVIEWS
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 14 Jul 1999 10:56:38 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Why Perl instead of ColdFusion?
Message-Id: <378c5ed6@newsread3.dircon.co.uk>
Henry Porter <porterh@yahoo.com> wrote:
>
> There must exist good reasons to choose Perl over CF; I look forward to
> hearing them.
>
Cold Fustion is not a general purpose programming language - I doubt if
I could use it for a twentieth of the things that I use Perl for.
/J\
--
"The chef's salty balls have dropped" - Christopher Price, BBC NEWS 24
------------------------------
Date: Wed, 14 Jul 1999 12:17:01 +0100
From: Martin Quensel <martin@adoma.se>
Subject: Re: Why Perl instead of ColdFusion?
Message-Id: <378C71AD.99357BA3@adoma.se>
Henry Porter wrote:
> There must exist good reasons to choose Perl over CF; I look forward to
> hearing them.
its free, its cool, its fun!
Seems like you use it only for databases, well, have you ever used CF to
create VRML worlds? or GIF's on the fly?
I bet CF is good at whatever it is that it does, but why use something
that you only can use for one purpose..(If creating webpages is the only
thing you do, well, then i bet its a nice tool though)
Its like a Sony Playstation...great for games, but you cant use it even
to write a single mail to Mom.
IMHO
Martin Quensel
------------------------------
Date: Tue, 13 Jul 1999 15:06:12 -0500
From: "End User" <kimntodd@dontspamus.execpc.com>
Subject: Win32 on NT Question
Message-Id: <7mi1b4$cfu$1@ffx2nh3.news.uu.net>
I am at best, a terrible hack when it comes to writing in perl. However, I
have a lot of fun. Now for my question.
I am attempting to write my own .pm that has many common functions that I
use in most of my scripts. I am trying to do this in such a way so that my
scripts will work on mahcine that dont have the NTResourceKit installed.
Currently I rely heavily on tools such as nltest and netdom to give me
information about the machines in my network. The first thing I am
interested in is:
how do I determine the PrimaryDomainController for a domain.
Using my nt tools, I would do something like this:
sub get_pdc{
open(PDC, "nltest /dcname:$domain|");
while (defined($line=<PDC>)){
$pdc = substr($line, 8, 10)
--
Todd Hayward
Global Analyst, Systems Engineer
MCSE, Compaq ACT
noc at bakernet dot com
------------------------------
Date: Wed, 14 Jul 1999 12:01:34 +0100
From: Martin Quensel <martin@adoma.se>
Subject: Re: Win32 Perl Editors
Message-Id: <378C6E0E.12A56F4C@adoma.se>
"John M. Dlugosz" wrote:
>
> I use "Source Insight" (www.sourcedynamics.com). The upcoming version has
> full Perl support.
>
> Kevin Kuebler <kkuebler@iwaynet.net> wrote in message
> news:7mga44$3cl$1@news.iwaynet.net...
[cut..]
> > What about other editors - any favorites among the Windows Perl community out
> > there?
> >
I like EditPlus.
It has colored syntax for perl (java, C++, HTML, as well) linenumbers,
you can run your perl programs directly from it (has a output
window)(you have to define this under tools..)
Well, i like it..its a nice editor IMHO.
Martin Quensel
------------------------------
Date: Wed, 14 Jul 1999 11:14:22 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Win32 Perl Editors
Message-Id: <378d6245.406852983@news.insnet.net>
On Tue, 13 Jul 1999 17:12:19 -0400, "Kevin Kuebler"
<kkuebler@iwaynet.net> said:
>Hi all,
>
>I downloaded a demo copy of Perl Builder and so far I'm quite impressed.
>It's a version 1.0 release, so there are some problems, but overall it seems
>like it could be a great Perl editor. It feels much like the Microsoft
>Visual Basic development environment ...
As soon as it supports VB-style drag 'n' drop interface building for
perl/tk, I'll pay for it.
[Copying newsgroup posts to me by mail is considered rude]
--
David Cantrell, part-time Unix/perl/SQL/java techie
full-time chef/musician/homebrewer
http://www.ThePentagon.com/NukeEmUp
------------------------------
Date: 14 Jul 1999 13:28:50 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Win32 Perl Editors
Message-Id: <378c8282@newsread3.dircon.co.uk>
Kevin Kuebler <kkuebler@iwaynet.net> wrote:
> It feels much like the Microsoft
> Visual Basic development environment.
>
Is that supposed to be a recommendation ?
/J\
--
"I don't have access to the intelligence" - Michael Howard
------------------------------
Date: Wed, 14 Jul 1999 13:04:35 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: Win32 Perl Editors
Message-Id: <378C7CD3.29FB48A@hotmail.com>
Kevin Kuebler wrote:
>
> Hi all,
>
> I've been using the ActiveState releases of Perl for some time now. The
> other day I came across the Windows95/NT section of the ActivePerl FAQ. One
> of the subsections is titled "What editors are available for Windows?" I
> decided to check out the Perl Builder application. Until then I'd been using
> Programmer's File Editor (PFE32) - a freeware file editor - to edit my Perl
> scripts. PFE32 is a nice basic editor isn't a real IDE like Perl Builder
> (with color coded syntax highlighting, debuging tools, etc.)
>
> I downloaded a demo copy of Perl Builder and so far I'm quite impressed.
> It's a version 1.0 release, so there are some problems, but overall it seems
> like it could be a great Perl editor. It feels much like the Microsoft
> Visual Basic development environment. It also has some pretty cool features
> for developing cgi scripts in Perl but I haven't really tried them out yet.
>
> Does anyone have any experience with this program? I'm trying to decide if
> it's worth the $150 price or if I should try something else first. What
> about other editors - any favorites among the Windows Perl community out
> there?
use Vile, its vile, or vim which does colours!!!!
Richard H
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V9 Issue 139
*************************************