[14000] in Perl-Users-Digest
Perl-Users Digest, Issue: 1410 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 17 18:15:38 1999
Date: Wed, 17 Nov 1999 15:10:29 -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: <942880228-v9-i1410@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 17 Nov 1999 Volume: 9 Number: 1410
Today's topics:
differences between 5.004_04 and 4.0.1.8 <jeantt@sr.hp.com>
Re: differences between 5.004_04 and 4.0.1.8 (Kragen Sitaker)
Re: differences between 5.004_04 and 4.0.1.8 (Brett W. McCoy)
Re: differences between 5.004_04 and 4.0.1.8 <rootbeer@redcat.com>
Re: Fetch Dilbert. <gellyfish@gellyfish.com>
Re: File::Find on Win32 :-( - getit4.pl (1/1) <cassell@mail.cor.epa.gov>
Re: File::Find on Win32 :-( - getit4.pl (1/1) <gellyfish@gellyfish.com>
Re: Flat File Searching Problem <martin@mert.globalnet.co.uk>
Re: Flat File Searching Problem <lr@hpl.hp.com>
Re: Flat File Searching Problem <kbandes@home.com>
FLOCK it <jtjohnston.delete@courrier.usherb.ca>
Re: FLOCK it <rootbeer@redcat.com>
Re: foreach on a hash within a hash <gellyfish@gellyfish.com>
frames affected by reload neuermarkt@my-deja.com
Re: How do I reference the NT registry with Perl 4 ? <rootbeer@redcat.com>
How to use LWP::UserAgent through firewall/proxy <bradw@newbridge.com>
Re: Is $$variable allowed like in PHP ? <uri@sysarch.com>
Re: Is $$variable allowed like in PHP ? <bene@chiark.greenend.org.uk>
Re: Is $$variable allowed like in PHP ? <uri@sysarch.com>
Re: IS THIS THE RIGHT GROUP TO POST PERL INSTALLATION P <Mike.Wescott@ColumbiaSC.NCR.COM>
Re: Making a Perl/Tk standalone executable <nigel_williams@my-deja.com>
Memory full Requested 2000000 <solovyev@eosbiotech.com>
Re: Memory full Requested 2000000 (Kragen Sitaker)
Re: Multiple scripts (Martien Verbruggen)
Re: my Net::FTP script <hmpeng@ppserver.tamu.edu>
mySql question with perl crackbaby1@my-deja.com
Re: mySql question with perl (Kragen Sitaker)
Re: mySql question with perl (Kragen Sitaker)
Re: mySql question with perl <lr@hpl.hp.com>
Net::Telnet SMTP monitor flakes out <mosheh@post.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 17 Nov 1999 12:03:06 -0800
From: Jean Tillinghast <jeantt@sr.hp.com>
Subject: differences between 5.004_04 and 4.0.1.8
Message-Id: <383309FA.8308D9BD@sr.hp.com>
I have a program written using Perl version 4.0.1.8 and it will not run
with version 5.001 or 5.004_04. Since I have to upgrade to either of
the 5.XXX versions I figured it would be easiest to move to 5.004_04.
Does anyone know how to find out what the particular differences are
between version 4.0.1.8 and 5.004_04?
thanks ahead of time
------------------------------
Date: Wed, 17 Nov 1999 20:51:07 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: differences between 5.004_04 and 4.0.1.8
Message-Id: <%yEY3.22027$YI2.999169@typ11.nn.bcandid.com>
In article <383309FA.8308D9BD@sr.hp.com>,
Jean Tillinghast <jeantt@sr.hp.com> wrote:
>I have a program written using Perl version 4.0.1.8 and it will not run
>with version 5.001 or 5.004_04. Since I have to upgrade to either of
>the 5.XXX versions I figured it would be easiest to move to 5.004_04.
>
>Does anyone know how to find out what the particular differences are
>between version 4.0.1.8 and 5.004_04?
There are 'perldelta' and 'perltrap' man pages. They may help you
some. Doesn't tchrist have a web page with a more extensive list of
changes from Perl4 to Perl5?
There never was a 4.0.1.8 version of Perl, though.
Most of the problems should not be subtle; you will get error
messages. Not all of them, though.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 17 Nov 1999 21:05:09 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: differences between 5.004_04 and 4.0.1.8
Message-Id: <slrn83668e.cba.bmccoy@moebius.foiservices.com>
Also Sprach Jean Tillinghast <jeantt@sr.hp.com>:
>I have a program written using Perl version 4.0.1.8 and it will not run
>with version 5.001 or 5.004_04. Since I have to upgrade to either of
>the 5.XXX versions I figured it would be easiest to move to 5.004_04.
Why not upgrade to 5.005_03? That's the most current version.
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: Wed, 17 Nov 1999 14:02:52 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: differences between 5.004_04 and 4.0.1.8
Message-Id: <Pine.GSO.4.10.9911171401540.15797-100000@user2.teleport.com>
On Wed, 17 Nov 1999, Kragen Sitaker wrote:
> There never was a 4.0.1.8 version of Perl, though.
$ perl4 -v
This is perl, version 4.0
$RCSfile: perl.c,v $$Revision: 4.0.1.8 $$Date: 1993/02/05 19:39:30 $
Patch level: 36
Copyright (c) 1989, 1990, 1991, Larry Wall
Ah, you're right. It was _revision_ 4.0.1.8. :-)
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 17 Nov 1999 22:39:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Fetch Dilbert.
Message-Id: <80vari$4bo$1@gellyfish.btinternet.com>
On Wed, 17 Nov 1999 05:48:56 GMT Martien Verbruggen wrote:
> On 16 Nov 1999 23:50:04 -0500,
> Uri Guttman <uri@sysarch.com> wrote:
>
>> hiding behind no signature nor real name. how brave! how strong!
>>
>> i bet this is the twit who recently said he would come back and we
>> wouldn't know it. but of course he can't admit that now or he would be
>> wrong in that prediction. and he is too ashemed to show his face anyhow.
>
> I think you're right. The style is very similar.
>
> From my score file:
> % From: "George Jempty" <jb4mt@verbatims.com>
> % Ranted illogically about Abigail. Does not know what
> % spam is. Needs a LART: clueless Usenet abuser
> From: jb4mt@verbatims\.com
>
> Looks like the abuse is continuing.
>
Looks like its someone who works for Biosym Technologies Incorporated
of San Diego - nice of Deja news to put that in the header they send.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 17 Nov 1999 11:54:33 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <383307F9.2E890502@mail.cor.epa.gov>
John Armsby wrote:
[Encoding: x-uuencode]
With a program this short, why are you uuencoding it to send to
a text newsgroup?
My advice: use perldoc to read about the File::Find module.
perldoc File::Find
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 17 Nov 1999 21:37:14 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: File::Find on Win32 :-( - getit4.pl (1/1)
Message-Id: <80v76a$46l$1@gellyfish.btinternet.com>
On Wed, 17 Nov 1999 00:15:50 GMT John Armsby wrote:
> begin 644 getit4.pl
> M(R%C.EQP97)L7&)I;EQP97)L#0IU<V4@1FEL93HZ1FEN9#L-"@T*9FEN9"!S
Well aside from the fact that it is considered to be in very poor taste
to post uuencode stuff to non-binary groups I'm not quite sure what your
problem is - apart from a little rudimentary checking to see if you
are getting what you think you are - read the File::Find manpage to
find what is found in $_ in the wanted sub :
#!c:\perl\bin\perl -w
use File::Find;
find \&Getit , 'develop/';
sub Getit
{
if ( -f && (@FileStat = stat) )
{
$FileName =$File::Find::name;
$FileTime = $FileStat[9];
$LocalFileTime =localtime($FileTime);
$FileName =~ s/j://;
$FileName =~ s/\/depts/vault/;
print("\n$FileName|$LocalFileTime");
}
}
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 17 Nov 1999 18:06:26 -0000
From: "Martin Elliott" <martin@mert.globalnet.co.uk>
Subject: Re: Flat File Searching Problem
Message-Id: <80ur1m$ang$1@gxsn.com>
Thanks a lot,
I have looked at your code (and understood it !!!! I'm getting the hang of
this scripting lark) and it does exactly what I want it to :-)
Cheers,
Martin
------------------------------
Date: Wed, 17 Nov 1999 11:00:25 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Flat File Searching Problem
Message-Id: <MPG.129c9b2982fcdfcc98a21c@nntp.hpl.hp.com>
In article <80ur1m$ang$1@gxsn.com> on Wed, 17 Nov 1999 18:06:26 -0000,
Martin Elliott <martin@mert.globalnet.co.uk> says...
> ... I'm getting the hang of
> this scripting lark) and it does exactly what I want it to :-)
What is a 'scripting lark'? Oh, maybe you mean 'programming'.
Perl is a programming language, and things written using Perl are Perl
programs. Some languages have 'script' in their names, and you can call
things written using them scripts; but Perl isn't one of them.
(I've heard of something called PerlScript, but I don't want to upchuck
my breakfast over something like that.)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 Nov 1999 16:53:20 -0500
From: Kenneth Bandes <kbandes@home.com>
Subject: Re: Flat File Searching Problem
Message-Id: <383323D0.1A8DDADA@home.com>
Larry Rosler wrote:
> (I've heard of something called PerlScript, but I don't want to upchuck
> my breakfast over something like that.)
No need to lose cookies over PerlScript - it's just Perl, complete and
intact, packaged as a COM object so that it can be called in various
Windows contexts, such as Active Server Pages, scriptlets, etc.
"Script" refers in this case to conformance to a set of interfaces
known collectively as "ActiveX Scripting."
What it isn't: to Perl as JavaScript is to Java.
What it is: very useful if you're working in Windows (the effect
of which on your breakfast I can't answer for...)
Ken Bandes
------------------------------
Date: Wed, 17 Nov 1999 12:23:51 -0500
From: JTJ <jtjohnston.delete@courrier.usherb.ca>
Subject: FLOCK it
Message-Id: <3832E4A7.5CE2@courrier.usherb.ca>
Can anyone help me flock this? I have a few example here somewhere but
can't really make sense of it. Never done it before, actually. Newbie
question but so what :)
I'd really appreciate an e-mail if you can.
Thanks
John
############################################################################
open(HTMLFILE,"<$ActivityFile");
@inputData=<HTMLFILE>;
close(HTMLFILE);
foreach $inputDataLine (@inputData)
{
$inputDataLine =~s/\<\!\-\- Dynamic HTML \- Internet Lesson Plan
\-\-\>/$HTMLInsert/go;
}
open(OUTPUTFILE,">$ActivityFile");
print OUTPUTFILE @inputData;
close(OUTPUTFILE);
@OutPutFile = "$ActivityFile";
chmod (0644, @OutPutFile);
print "Location: $in{'Redirect'}\n\n";
------------------------------
Date: Wed, 17 Nov 1999 10:50:30 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: FLOCK it
Message-Id: <Pine.GSO.4.10.9911171046280.15797-100000@user2.teleport.com>
On Wed, 17 Nov 1999, JTJ wrote:
> open(HTMLFILE,"<$ActivityFile");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
> foreach $inputDataLine (@inputData)
> {
> $inputDataLine =~s/\<\!\-\- Dynamic HTML \- Internet Lesson Plan
> \-\-\>/$HTMLInsert/go;
> }
Don't try to parse HTML with simple patterns. I think you want
HTML::Parser. Also, do you know what the /o option does? And you seem to
use a lot of unnecessary backslashes in your pattern.
> @OutPutFile = "$ActivityFile";
I'm not sure what you think you're doing by using the quote marks.
I think you could use the methods in Randal's fourth Web Techniques
column, which explains how to use flock() to avoid problems when multiple
processes need to modify one file. Hope this helps!
http://www.stonehenge.com/merlyn/WebTechniques/
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 17 Nov 1999 21:58:35 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: foreach on a hash within a hash
Message-Id: <80v8eb$47g$1@gellyfish.btinternet.com>
On Wed, 17 Nov 1999 03:32:07 GMT Curtis Jones wrote:
> What is the best way to go about retrieving a list of the values of a
> hash within a hash?
>
> If I simply have a hash,
>
> %hash;
> $hash{'one'};
> $hash{'two'};
> $hash{'three'};
>
> I can do a:
>
> foreach ( sort keys %hash ) ...
>
> to retrieve each of the values in it, but I can't seem to figure out how
> to do that to a hash that is within a hash...or deeper.
>
If by deeper you mean you might not even know what structure your data
might have before hand then you consider using a recursive thing - I
have posted this before but I couldnt tell you how to find it on
Deja news :
#!/usr/bin/perl -w
use strict;
my %hohoh = (
blah => 'woof',
hash1 => {
bark => 'meow',
foo => 'bar',
hash2 => {
cat => 'dog',
duck => 'fish',
hash3 => {
zoo => 'car',
rat => 'mouse'
},
barbie => 'ken'
}
},
trumpet => 'ear'
);
printHoH(\%hohoh,'');
sub printHoH
{
my ($hash,$parent) = @_;
foreach my $key ( keys %{$hash} )
{
if (ref $hash->{$key} eq "HASH" )
{
printHoH($hash->{$key},"$parent $key =>");
}
else
{
print "$parent $key => $hash->{$key}\n";
}
}
}
You will almost certainly will want to be looking at perlol, perlref,perldsc
manpages etc ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 17 Nov 1999 22:08:57 GMT
From: neuermarkt@my-deja.com
Subject: frames affected by reload
Message-Id: <80v91f$h6j$1@nnrp1.deja.com>
Hi,
I have a site with several frames and I want the reload button effect
only on some of the frames. The others should be excluded from
reloading.
Has someone any idea if I can solve that problem with perl?
Thanks a lot
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 09:14:47 -0800
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: How do I reference the NT registry with Perl 4 ?
Message-Id: <Pine.GSO.4.10.9911170912340.15797-100000@user2.teleport.com>
On Wed, 17 Nov 1999, Jennell Little wrote:
> Is there a way to reference the NT registry with Perl 4?
I'm sure that the first step is to install a version of Perl which isn't
older than Madonna's daughter. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 17 Nov 1999 17:16:18 -0500
From: Brad Warkentin <bradw@newbridge.com>
Subject: How to use LWP::UserAgent through firewall/proxy
Message-Id: <op1emdosr0t.fsf@newbridge.com>
I am trying to use LWP::UserAgent to fetch webpages. Works fine on our
intranet but I whenever I try and get anything from outside I get a
"403 Forbidden" error.
Obvious I don't have the ua->proxy setup correctly but I will be
damned if I can figure it out.
Obdidhomework: I have read lwpcookbook, LWP::UserAgent,
HTTP::Response, wander around aimlessly in dejanews, etc.
I have no problem with netscape and thus am assuming it is a stupid
syntax thing.
If our proxy for ftp, http, and gopher is a machine called bob and our
domain is newbridge, what should the proxy setup be?
I have tried both hostname & ip variations, with and without the port.
Why does the following not work
$ua->proxy(http => 'http://bob.ca.newbridge.com:80');
$ua->no_proxy('ca.newbridge.com','uk.newbridge.com','us.newbridge.com');
thanks,
bj
--
bradw@newbridge.com Newbridge Networks Corporation
Brad Warkentin 600 March Road, Kanata, Ontario K2K 2E6
CAE Toolsmith (613) 599-3600 ext. 6117 FAX: 599-3654
------------------------------
Date: 17 Nov 1999 13:12:40 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <x73du5t2av.fsf@home.sysarch.com>
>>>>> "BE" == Ben Evans <bene@chiark.greenend.org.uk> writes:
>> Put it the other way. Why do you want to use these rather than a hash?
BE> I'm writing code which will be maintained and probably substantially
BE> modified by people who are far less used to programming than I am.
BE> They don't really understand hashes too well, and the syntax someone
BE> else suggested raised nothing but glazed looks from them.
but is teaching them a bad method which will cause more problems down
the road worth the sacrifice of a little more syntax?
>> Choose the path of least resistence.
BE> That's exactly what I'm trying to do. :)
BE> Figure out whether it's going to be less hassle to teach them or
BE> just deal with any problems that come from using soft refs, which
BE> they all understand.
but they don't (or won't) understand all the problems with symrefs. and
debugging symref data is a nightmare. do they care about that? debugging
hash structures is easy with perldb or Data::Dumper. the syntax is not
that bad and makes plenty of sense once you get it. also it allows for
trees of data whereas symrefs are basically flat (you have to keep track
of the tree branches with other vars which are named by vars,
etc. UGLY!) unless you use packages or complex naming conventions which
will be hard to to debug as well.
BE> But then, I couldn't necessarily see why for the cases where I
BE> wanted to use them, they would be a Bad Idea, so I thought I'd
BE> ask.
well, you got answers. are you going to do the right thing or wimp out
and teach evil black magic to a bunch of perl newbies?
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 17 Nov 1999 21:14:57 +0000 (GMT)
From: Ben Evans <bene@chiark.greenend.org.uk>
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <5dr*0Amdo@news.chiark.greenend.org.uk>
In article <x73du5t2av.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
>>>>>> "BE" == Ben Evans <bene@chiark.greenend.org.uk> writes:
>
> BE> But then, I couldn't necessarily see why for the cases where I
> BE> wanted to use them, they would be a Bad Idea, so I thought I'd
> BE> ask.
>
>well, you got answers. are you going to do the right thing or wimp out
>and teach evil black magic to a bunch of perl newbies?
So, let me get this straight... you're asking me to make a direct
choice between Good and Evil, with the "Good" option requiring extra
mental discipline on my part?
Symref::Lightsaber::DoubleHeaded , anyone?
Kitty
--
Ben Evans (bene@chiark.greenend.org.uk)
Just Another Evil-Policy Wielding Politely Frivolous High Density Random
Blonde Perl-Hacking Dilated-Eyed Gonzo Nancy Geek Kitten-Boy
------------------------------
Date: 17 Nov 1999 16:44:29 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <x7so24sshu.fsf@home.sysarch.com>
>>>>> "BE" == Ben Evans <bene@chiark.greenend.org.uk> writes:
>> well, you got answers. are you going to do the right thing or wimp out
>> and teach evil black magic to a bunch of perl newbies?
BE> So, let me get this straight... you're asking me to make a direct
BE> choice between Good and Evil, with the "Good" option requiring extra
BE> mental discipline on my part?
BE> Symref::Lightsaber::DoubleHeaded , anyone?
look, make your own choice. i don't really care. you are asking for help
here and we tell you not to use symrefs. you can use them. perl and this
group won't stop you. but don't you or any of your "students" ask for
any help here as we are giving you good advice and you seem to be
ignoring it. we say not to use symrefs for very good reasons and you
don't grok them. your loss.
have fun with symrefs. why not make all your symrefs with eval $string
too? easy enough to do. what about using a single variable and have it
contain one long string (ala turing) since that is simpler to explain
and only one name needs to be memorized?
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 17 Nov 1999 10:05:09 -0500
From: Mike Wescott <Mike.Wescott@ColumbiaSC.NCR.COM>
Subject: Re: IS THIS THE RIGHT GROUP TO POST PERL INSTALLATION PROBLEMS?
Message-Id: <x4wvrhyx96.fsf@ColumbiaSC.NCR.COM>
RAMANATHAN <ibzobang@vsnl.com> writes:
> I have i386 machine running scosysv 3.2. I tried to install perl5.005
> with default options "configure -d".
>
> When I run "make", i get the following messages towards the end.
> Could any one please tell me what is wrong and what should be done in
> rectification? Thanks.
[...]
> cc -o perl perlmain.o lib/auto/DynaLoader/DynaLoader.a
> lib/auto/B/B.a lib/auto/Data/Dumper/Dumper.a lib/auto/Fcntl/Fcntl.a
> lib/auto/IO/IO.a lib/auto/IPC/SysV/SysV.a lib/auto/Opcode/Opcode.a
> lib/auto/POSIX/POSIX.a lib/auto/SDBM_File/SDBM_File.a
> lib/auto/attrs/attrs.a lib/auto/re/re.a libperl.a `cat ext.libs` -lintl
> -lnsl_s -ldbm -lld -lm -lc -lPW -lx
> *** Error code 13
I suspect lack of virtual memory space has caused this problem. ld is
not very forthcoming with messages in that situation. Try increasing
the vm ulimit.
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: Wed, 17 Nov 1999 18:20:45 GMT
From: Nigel W <nigel_williams@my-deja.com>
Subject: Re: Making a Perl/Tk standalone executable
Message-Id: <80urlp$6o0$1@nnrp1.deja.com>
In article <80snr1$3cf$1@gellyfish.btinternet.com>,
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Tue, 16 Nov 1999 13:43:06 GMT Nigel W wrote:
> >
> >> Nigel W wrote:
> >> >
> >> > Does anyone know if it's possible to make a wrapper for a Perl/Tk
> >> > script so that it can run on a system which doesn't have Perl/Tk
> >> > installed.
> >>
> >> In theory. I've found it more useful to write a simple script
> >> which just installs Perl and Tk on the machine I want to use.
> >
> > I suppose that's possible if I include Perl/Tk on the CD, install it
> > then delete it when done. Ideally I'd like to include Perl/Tk on
the CD
> > and run the scripts from there.
> >
> > What do I need to include on the CD? I normally use /use/local/bin &
> > lib for perl5 - if I put these on CD and use #!../bin/perl (a
relative
> > path) will Perl still be able to find it's libraries or is there an
> > environment variable that can be used?
>
> You could build a new Perl with a separate prefix (say /cdrom) so you
> get /cdrom/bin with the excutables in it /cdrom/lib/perl5 etc etc then
> install Tk into this structure (i.e using the Perl from /cdrom/bin) -
then
> burn this structure onto your CD with a shell script that sets the
PATH
> right for this. When you want to use the installation from the CD
> you just mount the cd under the same directory name you installed
under
> run the script to set the PATH and hey presto ! Of course I know
> nothing about making CDs so I could be barking here ...
I suppose that's possible - Solaris will generally use /cdrom/cdrom0
provided that the volume manager is doing the CD mounting.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
> <http://www.gellyfish.com>
> Hastings:
<URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 12:57:24 -0800
From: Victor Solovyev <solovyev@eosbiotech.com>
Subject: Memory full Requested 2000000
Message-Id: <383316B4.EAE0B037@eosbiotech.com>
I have a message running Perl script
Memory full Requested 2000000 and
the script continue to run (seems right).
Is it normal or I should look for some bug in my script?
Regards, Victor
------------------------------
Date: Wed, 17 Nov 1999 20:57:34 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Memory full Requested 2000000
Message-Id: <2FEY3.22032$YI2.999571@typ11.nn.bcandid.com>
In article <383316B4.EAE0B037@eosbiotech.com>,
Victor Solovyev <solovyev@eosbiotech.com> wrote:
>I have a message running Perl script
>Memory full Requested 2000000 and
>the script continue to run (seems right).
>Is it normal or I should look for some bug in my script?
That's not a Perl error message. Perl error messages are listed in
perldoc perldiag. Perhaps (a) you have pasted the error message
incorrectly or (b) there is a statement in your script that says
something like print "Memory full Requested $num" or (c) the message
comes from something else entirely.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: 17 Nov 1999 22:35:04 GMT
From: mgjv@wobbie.heliotrope.home (Martien Verbruggen)
Subject: Re: Multiple scripts
Message-Id: <slrn836bds.q08.mgjv@wobbie.heliotrope.home>
On Tue, 16 Nov 1999 12:33:59 +0300,
Alexei Novikov <anovikov@heron.itep.ru> wrote:
> I'm afraid I did not explained my problem correctly. Surely I can write
> a config file and parse it, or I can put all variables in the module and
> load them from it, but there are 2 things that should be defined at
> "compile" time, - path to the perl executable and "prefix" (like
> /usr/share or smth else). How can I assign these 2 parameters with
> MakeMaker ?
If you want it to happen at compile time, use 'use' instead of require,
or make sure it's all in a BEGIN block.
If you really want todo it at _installation_ time, which is not the same
thing, you could use #defines, and run cpp over it before, you could use
m4, you could put some placeholders in the code, and use sed or perl
itself to replce them with the actual values. But I wouldn't do that.
Perl can easily deal with this at compile time. There is no real reason
to force the issue at installation (basically requiring people to
reinstall instead of just changing a configuration file wehn something
changes)
Martien
--
Martien Verbruggen |
Interactive Media Division | In the fight between you and the
Commercial Dynamics Pty. Ltd. | world, back the world - Franz Kafka
NSW, Australia |
------------------------------
Date: Wed, 17 Nov 1999 16:41:34 -0600
From: "Mei" <hmpeng@ppserver.tamu.edu>
Subject: Re: my Net::FTP script
Message-Id: <80vb3i$13n$1@news.tamu.edu>
Hello,
I found the solution now. Just took $ftp->type(“binary”) out from the
script. It works.
Mei
------------------------------
Date: Wed, 17 Nov 1999 20:57:07 GMT
From: crackbaby1@my-deja.com
Subject: mySql question with perl
Message-Id: <80v4r1$e2s$1@nnrp1.deja.com>
I have a form, mySql database, and my "insert into" command works until
the user enters in " " " or "'"...
any ideas...
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 17 Nov 1999 21:27:29 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: mySql question with perl
Message-Id: <55FY3.22066$YI2.1003283@typ11.nn.bcandid.com>
In article <80v4r1$e2s$1@nnrp1.deja.com>, <crackbaby1@my-deja.com> wrote:
>I have a form, mySql database, and my "insert into" command works until
>the user enters in " " " or "'"...
Hey, you're lucky they haven't trashed your database.
You'd think this would be in the SQL FAQ, but I can't find an SQL FAQ.
This is not a Perl command, but the answer is that you must double
those characters. s/(["'])/$1$1/g should do it.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 17 Nov 1999 21:30:50 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: mySql question with perl
Message-Id: <e8FY3.22076$YI2.1003562@typ11.nn.bcandid.com>
In article <55FY3.22066$YI2.1003283@typ11.nn.bcandid.com>,
Kragen Sitaker <kragen@dnaco.net> wrote:
>This is not a Perl command,
"This is not a Perl question," I meant.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 17 Nov 1999 13:52:42 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: mySql question with perl
Message-Id: <MPG.129cc3844dff611198a225@nntp.hpl.hp.com>
In article <55FY3.22066$YI2.1003283@typ11.nn.bcandid.com> on Wed, 17 Nov
1999 21:27:29 GMT, Kragen Sitaker <kragen@dnaco.net> says...
> In article <80v4r1$e2s$1@nnrp1.deja.com>, <crackbaby1@my-deja.com> wrote:
> >I have a form, mySql database, and my "insert into" command works until
> >the user enters in " " " or "'"...
>
> Hey, you're lucky they haven't trashed your database.
>
> You'd think this would be in the SQL FAQ, but I can't find an SQL FAQ.
>
> This is not a Perl command, but the answer is that you must double
> those characters. s/(["'])/$1$1/g should do it.
So should the DBI function designed for this purpose:
DBI::quote
$quoted_string = $dbh->quote($string);
Also, if you use a placeholder '?' in the prepared SQL and pass the
argument in via $sth->execute(...), it doesn't need to be (and shouldn't
be) quoted.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 17 Nov 1999 14:42:22 -0800
From: Gregor Mosheh <mosheh@post.net>
Subject: Net::Telnet SMTP monitor flakes out
Message-Id: <38332F4E.7AB91603@post.net>
Hiya.
I've written a network monitoring program (freely distributable, if
anyone's interested) that monitors, among other things, SMTP
availability.
As you can see (the code is below), it uses Net::Telnet to establish a
connection to port 25. It looks for a 220 code and then disconnects,
returning a 1 on success or a 0 on failure. Three failures in a row
causes it to send an alarm to my pager.
For some reason, it goes off a good 5 times a day. When I telnet to port
25, SMTP responds quickly and nothing indicates that SMTP wasn't
responding at the time (e.g. due to load average). The original version
of this program used a bunch of Expect scripts that did the same thing:
telnet, look for the string "220", return 0 on failure - and the Expect
programs did the same thing, going off 5 times a day when the SMTP was
very probably responding just fine.
Any ideas on this? This is my first try using Perl modules (they rule)
and I may be screwng something up...
use Net::Telnet ;
foreach $host (@hosts) {
$test{'smtp'} && ( &test_smtp($host) || &test_smtp($host)
|| &test_smtp($host) || &error($host,"SMTP not responding") );
}
exit ;
sub test_smtp {
return unless ($_[0]);
sleep 3 ;
local($line, $foosocket);
$foosocket = new Net::Telnet (Telnetmode => 0);
$foosocket->timeout(30);
$foosocket->errmode("return");
$foosocket->open(Host => $_[0], Port => 25);
$line = $foosocket->getline;
$foosocket->close;
return ($line =~ /^220 /) ? 1 : 0 ;
}
------------------------------
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 V9 Issue 1410
**************************************