[13989] in Perl-Users-Digest
Perl-Users Digest, Issue: 1399 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 16 18:10:44 1999
Date: Tue, 16 Nov 1999 15:10:27 -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: <942793827-v9-i1399@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 16 Nov 1999 Volume: 9 Number: 1399
Today's topics:
Re: html form upload with ftp or http? (BLIMP8)
Re: html form upload with ftp or http? (Kragen Sitaker)
Re: html form upload with ftp or http? <gellyfish@gellyfish.com>
Re: http redirection <gellyfish@gellyfish.com>
Re: It is always like this here? <dbell@salmon.maths.tcd.ie>
Re: Java faster than perl ?!?!? <cassell@mail.cor.epa.gov>
Re: Java faster than perl ?!?!? <cassell@mail.cor.epa.gov>
Re: Longest match (Craig Berry)
Re: Making a Perl/Tk standalone executable <gellyfish@gellyfish.com>
Re: Maximum number of open files <Mike.Wescott@ColumbiaSC.NCR.COM>
Re: Maximum number of open files (Kragen Sitaker)
Re: Move files. . . <aqumsieh@matrox.com>
Re: my ... if -- strange behavior <cassell@mail.cor.epa.gov>
my Net::FTP script <hmpeng@ppserver.tamu.edu>
Re: Need help with perl <cassell@mail.cor.epa.gov>
Re: NEED HELP: perl on solaris execution problem (Kragen Sitaker)
Re: Net::FTP <theglauber@my-deja.com>
Re: Perl 5.005 modules listing (Brett W. McCoy)
Re: Perl 5.005 modules listing <gellyfish@gellyfish.com>
Re: Perl Array close command on Windows (Kragen Sitaker)
Re: PERL script with JScript embedded <cassell@mail.cor.epa.gov>
Re: Perl Scripts for NT <gellyfish@gellyfish.com>
Re: Perl Wizards <gellyfish@gellyfish.com>
perl/tk and dbi/rdbms jsander0@my-deja.com
Re: Please help me create a file with perl <aqumsieh@matrox.com>
Re: Please help me create a file with perl <gellyfish@gellyfish.com>
Re: Please help me create a file with perl (Jonas Nilsson)
Re: Please help me create a file with perl (Jonas Nilsson)
Re: Problem with glob on NT host <gellyfish@gellyfish.com>
Re: Q: Dodgy use of undef on global variables? <iain@zip.com.au>
Re: Q: how to get tied variable within FETCH (Kragen Sitaker)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Nov 1999 19:22:48 GMT
From: blimp8@aol.com (BLIMP8)
Subject: Re: html form upload with ftp or http?
Message-Id: <19991116142248.16524.00000195@ng-tx1.aol.com>
that was just my last question. any answers for the other ones?
------------------------------
Date: Tue, 16 Nov 1999 21:47:30 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: html form upload with ftp or http?
Message-Id: <ShkY3.19425$YI2.835183@typ11.nn.bcandid.com>
In article <19991116125229.16981.00000139@ng-fi1.aol.com>,
BLIMP8 <blimp8@aol.com> wrote:
>my site allows users to upload files via a web form . currently the http
>protocol is used with a perl script using cgi.pm . it is a bit slow. would
>using the Net:FTP module make things faster ?
No.
>if so , are there more security
>holes using an FTP client ?
Probably.
>I spent some time searching the web and only found
>that people use http via web forms.
Indeed.
> is there a reason for this ?
Yes. There are two ways to submit a form -- via email and via HTTP.
Via HTTP means you can get a response from the server. People like
this.
>also , with Net:FTP is there a way to check the size of a file before it's
>uploaded?
Dir, I think. But your UI is going to go to hell.
--
<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: 16 Nov 1999 21:33:30 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: html form upload with ftp or http?
Message-Id: <80sija$344$1@gellyfish.btinternet.com>
On 16 Nov 1999 17:52:29 GMT BLIMP8 wrote:
> my site allows users to upload files via a web form . currently the http
> protocol is used with a perl script using cgi.pm . it is a bit slow. would
> using the Net:FTP module make things faster ? if so , are there more security
> holes using an FTP client ? I spent some time searching the web and only found
> that people use http via web forms. is there a reason for this ?
>
You cant use Net::FTP to do this - it implements an FTP client, either you
want to implement an FTP server or you will need to insist that the users
have an FTP server running on their machine and then arrange some contrivance
to pass the relevant details to your cleint and then upload the file
from the users computer ... I dont think so. You are almost certainly
better off with using a CGI upload. If you are having problems with
file upload fields you will be better off asking in the newsgroup
comp.infosystems.www.authoring.cgi
> also , with Net:FTP is there a way to check the size of a file before it's
> uploaded?
>
That doesnt make sense in the context I outline above.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 15 Nov 1999 22:04:03 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: http redirection
Message-Id: <80q00j$2c0$1@gellyfish.btinternet.com>
On Mon, 15 Nov 1999 17:40:07 GMT perlkeith@hotmail.com wrote:
> dear all, i wrote a routine to get web page information using a LWP
> module, but the URL I specified in the $ua->request redirected me
> to another URL, so that I can't get the page result. Glad to have your
> supports. thx.
>
Read the LWP::UserAgent manpage to find out about the redirect_ok() method.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 16 Nov 1999 22:33:51 -0000
From: Derek Bell <dbell@salmon.maths.tcd.ie>
Subject: Re: It is always like this here?
Message-Id: <80sm4f$31e4$1@salmon.maths.tcd.ie>
Jonathan Stowe <gellyfish@gellyfish.com> wrote:
: Isnt a buttload by definition Imperial ?
Is that an ANSI buttload or an ISO buttload? :-)
Derek
--
Derek Bell dbell@maths.tcd.ie | Socrates would have loved
WWW: http://www.maths.tcd.ie/~dbell/index.html| usenet.
PGP: http://www.maths.tcd.ie/~dbell/key.asc | - Jo@bluejo.demon.co.uk
------------------------------
Date: Tue, 16 Nov 1999 14:43:12 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Java faster than perl ?!?!?
Message-Id: <3831DE00.4D565F6D@mail.cor.epa.gov>
Mike Coffin wrote:
>
> Ricardo Malta <RMalta@bigfoot.com> writes:
> > can some one tell me why this java script is so much faster than the
> > perl one ??
>
> Perl's byte-code interpreter doesn't have a just-in-time compiler, and
> the Java VM you are using probably does. If your program spends most
> of its time doing elementary operations (counting, branching, etc.),
> Java will be a lot faster---probably at least a factor of 15. On the
> other hand, if your program spends most of its time executing
> high-level Perl built-ins (pattern matching, etc.) then Perl could
> easily be faster.
Yep. And Ricardo's code was nothing but a huge nested loop that
could be optimized away *completely*.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 14:46:09 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Java faster than perl ?!?!?
Message-Id: <3831DEB1.FFEA7D82@mail.cor.epa.gov>
Kragen Sitaker wrote:
>
> In article <383084CA.B1431034@bigfoot.com>,
> Ricardo Malta <RMalta@bigfoot.com> wrote:
> >can some one tell me why this java script is so much faster than the
> >perl one ??
>
> A good implementation of Java can be faster than the current Perl
> implementation. (I assume
For a few things. Not for the things I routinely want Perl
to do, though. Like regexen.
[snip]
> Current JVMs do a lot of optimizations that the Perl interpreter
> doesn't even try to do; only some of them have to do with dynamic
> typing.
>
> Oh, and don't send MIME multipart stuff to Usenet. If you want us to
> read your Perl, you should include it in the message. (And if you want
> us to read your Java, you need to include it, too -- you didn't even
> attach it.)
Well, the whole program could be optimized down to this:
$j = 100;
print $j;
But he had two massive nested loops doing lots of wasted cycles,
so optimizing was the big win here. I just hope that he does
know the difference between that and real code.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 21:28:48 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Longest match
Message-Id: <s33j4gbihsq53@corp.supernews.com>
Rick Delaney (rick.delaney@home.com) wrote:
: Bart Lateur wrote:
: > How can you easily find the longest substring of only spaces (at least
: > two)? Maybe even using only one regex?
:
: print "($1)\n" if /( +)(?!.*\1)/s;
:
: or if you also want the position where the spaces start
:
: print pos, "($1)\n" if /(?=( +)(?!.*\1))/sg;
That's beautiful! The only change I might suggest is replacing ( +) with
( {2,}) -- multiple-space patterns are tough to read (and hence hard to
debug).
--
| Craig Berry - cberry@cinenet.net
--*-- http://www.cinenet.net/users/cberry/home.html
| "They do not preach that their God will rouse them
a little before the nuts work loose." - Kipling
------------------------------
Date: 16 Nov 1999 23:02:57 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Making a Perl/Tk standalone executable
Message-Id: <80snr1$3cf$1@gellyfish.btinternet.com>
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 ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 16 Nov 1999 15:56:21 -0500
From: Mike Wescott <Mike.Wescott@ColumbiaSC.NCR.COM>
Subject: Re: Maximum number of open files
Message-Id: <x4903y88ay.fsf@ColumbiaSC.NCR.COM>
Yossi Klein <jklein@alerts.co.il> writes:
> I'm working on a Solaris machine, and using ulimit, I upped the maximum
> number of file descriptors to 700. I then ran a test program using open
> and found that open() will only allow me to have to 256 files open at a
> time.
>
> Okay, I thought "Perl open() is based on C's fopen() which only supports
> fds up to 255".
>
> So I tried FileHandle and found that it also failed above 256; I can live
> with that.
>
> With supreme confidence, I decided to run the test with sysopen. Imagine
> my surprise when I found that still only 256 open fds were supported!!!
>
> This seems to me to be a major bug. I searched the archives and looked
> through the perlfaq, but there is no reference to this anywhere. Is this a
> real problem or am I missing something very obvious?
>
> PS I ran my program using truss and verified that the system call open()s
> were succeeding and that Perl was deciding to fail the Perl sysopen()
> call nonetheless.
It's not necessarily a perl bug. What release of Solaris are you
running? On my system (Solaris 7 3/99 s998x_u1wos_08 INTEL;perl
version 5.005_02) the open and sysopen tests fail on the 253rd
open. The FileHandle one succeeds.
--
-Mike Wescott
mike.wescott@ColumbiaSC.NCR.COM
------------------------------
Date: Tue, 16 Nov 1999 22:11:08 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Maximum number of open files
Message-Id: <0EkY3.19523$YI2.838368@typ11.nn.bcandid.com>
In article <Pine.GSO.4.10.9911161036310.15797-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> wrote:
>How many files can you have open from a C program? It may be that there is
>another limit besides your ulimit. But if you can open 700 files from C,
>you should be able to open 700 from Perl; else, run perlbug.
He sort of answered that; did you see what he said about truss? I
suppose he could try ltrace.
>Also, see the FileCache module.
Most programs that need 700 fd's open at once are network servers;
FileCache won't help them.
--
<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: Tue, 16 Nov 1999 12:26:50 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Move files. . .
Message-Id: <x3yd7taqrdy.fsf@tigre.matrox.com>
"Sphere" <sbrook@nildram.co.uk> writes:
> Is there a "safe" command in Perl that I can use to move text files from one
> place to another on a unix system - or should I be asking a unix group?
perldoc -f rename
--Ala
------------------------------
Date: Tue, 16 Nov 1999 15:03:37 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: my ... if -- strange behavior
Message-Id: <3831E2C9.BB4EA971@mail.cor.epa.gov>
John Lin wrote:
[snip]
> > sub countdown { my $static=9 if 0; print $static-- }
> > for(1..9) { countdown }
[snip]
> sub countdown { my $static=9 unless defined $static; print
> static-- }
[snip]
> P.S. Of course, the above code won't work in current versions of Perl.
>
> If we 'use strict', we get
> Fatal: Global symbol "$static" requires explicit package name
Right. Look up the 'use vars' pragma, and read through the
docs on 'use strict' to see ways to handle this.
> If we use '-w' with 'no strict', we get
> Warning: Name "main::static" used only once: possible typo
> and the result is
> 999999999
Just what I expected. Is that printed output what you wanted?
It is what you told Perl to write. And once you read the docs
I mentioned above, you'll see ways to deal with this warning
too.
But I'm concerned. You don't seem to know about some of the
fundamentals of Perl, yet you want to re-write the language.
Perhaps you should immerse yourself in the language first,
before you decide to force it into the strictures of the
languages you already know.
Just trying to help,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 16:40:41 -0600
From: "Mei" <hmpeng@ppserver.tamu.edu>
Subject: my Net::FTP script
Message-Id: <80smlg$h9t$1@news.tamu.edu>
Hello,
Here is my new script, but it is not working. I want to get all files that
have dat as file extension. I also want to get and put those files in
different directories. Can someone point out what is wrong?
use Net::FTP;
use strict;
my $hostname = ‘ftp.host.org’;
my $username = ‘anonymous’;
my $password = ‘mypassword’;
my $local_dir1 = ‘/home/mydir1’;
my $local_dir2 = ‘/home/mydir2’;
my $ftp_dir1 = ‘/pub/dir1’;
my $ftp_dir2 = ‘/pub/dir2’;
my ($file1, $file2);
chdir $local_dir1;
$ftp = Net::FTP->new($hostname);
$ftp->login($username, $password);
$ftp->cwd($ftp_dir1);
$ftp->type(“binary”);
my @dir1 = $ftp->ls(“$ftp_dir1/*.dat”);
foreach $file1(@dir1){
$ftp->get($file1);
}
chdir $local_dir2;
$ftp->cwd(ftp_dir2);
my @dir2 = $ftp->ls(“$ftp_dir2/*.dat”);
foreach $file2(@dir2){
$ftp->get($file2);
}
$ftp->quit;
#The end
Thanks.
Mei
------------------------------
Date: Tue, 16 Nov 1999 14:51:26 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Need help with perl
Message-Id: <3831DFEE.53B852EE@mail.cor.epa.gov>
Ganeshan, Suresh [CAR:7H14:EXCH] wrote:
>
> Hello,
>
> I am planning to setup a web base interface to my database.
> Since I am
> highly concerned about the security issues associated with it, I am
> thinking to hire some professional to write a code for me.
Good thought. Web security is non-trivial, since so many
webservers come with so much security turned off by default.
[snip]
> Is there any people where I can get help or any web sites you
> recommended?
Try www.pm.org for people skilled in Perl. Or one of
the Usenet newsgroups which has 'jobs' in its name.
> Or would it be better for me to write my own code?
Only if you know how to handle all the security features you
would want to implement. Otherwise, at least get an expert's
advice [after you show him exactly what you want].
> Beside, I still not clear which language is best suited?
Well, a number of your issues are actually language-independent.
Getting the server set up properly is more important than
choosing the language, since many languages can fulfill
your purposes.
Perl would work, and has many convenient modules to help
accomplish your goals. But it is not the only language
used on the web.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 16 Nov 1999 22:45:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: NEED HELP: perl on solaris execution problem
Message-Id: <Q7lY3.19559$YI2.844087@typ11.nn.bcandid.com>
In article <3830BAA2.7082F0E1@email.sps.mot.com>,
Noira Hadi <N.Hadi@motorola.com> wrote:
>I have a problem to exeute my perl script on . Here's the scenario:
"on ." means "in the current directory"?
>- My perl script is located in a Sun machine shared by all my client
>machines (thru NFS).
>- All the environment settings are common (shared) which is located in
>the server.
>- Some of the clients are able to run the script by typing the
>'filename' but some of them
> needs perl typed followed by filename ('perl filename').
For the same file?
Are you sure the environment is the same? Maybe some of the clients
are badly configured and have . in their PATH, and others are sanely
configured and don't.
--
<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: Tue, 16 Nov 1999 19:38:45 GMT
From: The Glauber <theglauber@my-deja.com>
Subject: Re: Net::FTP
Message-Id: <80sbs4$f60$1@nnrp1.deja.com>
In article <80s68c$5qk$1@news.tamu.edu>,
"Mei" <hmpeng@ppserver.tamu.edu> wrote:
> Hello,
>
> I am using the Net::FTP module for file transferring. When I only
wanted a
> few files, I can specify every file that I wanted. It works really
well.
> However, I frequently need to transfer more than thousand of files.
Can I
> use ‘prompt’ and ‘mget’? If so, how?
Use the ls method to populate an array of file names. Then, either get
each one, or do whatever prompting you want to do to decide which ones
to get. You could use grep() for example, to choose a subset of files
to download.
> In addition, when I change directory at the host site, I’d like to
change
> directory at my terminal as well. How do I do that?
Just use chdir() (standard Perl function, not part of Net::FTP.
--
Glauber Ribeiro
theglauber@my-deja.com
"Opinions stated are my own and not representative of Experian"
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 16 Nov 1999 21:14:39 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Perl 5.005 modules listing
Message-Id: <slrn833ie5.5io.bmccoy@moebius.foiservices.com>
Also Sprach Mike Judkins <mikej@1185design.com>:
>Anyone know the URL to view all the Perl modules that come standard with
>perl 5.00503? I dont want the listing of ALL the available modules, just
>the ones that come with Perl and links to their homepages. Thanks!
www.cpan.org has that, and more, including the ever mysterious FAQ, whose
location is everywhere and which is read nowhere...
--
Brett W. McCoy bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek) http://www.foiservices.com
FOI Services, Inc./DIOGENES 301-975-0110
---------------------------------------------------------------------------
------------------------------
Date: 16 Nov 1999 21:43:37 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl 5.005 modules listing
Message-Id: <80sj69$34i$1@gellyfish.btinternet.com>
On Tue, 16 Nov 1999 10:21:48 -0800 Mike Judkins wrote:
> Hey all,
>
> Anyone know the URL to view all the Perl modules that come standard with
> perl 5.00503? I dont want the listing of ALL the available modules, just
> the ones that come with Perl and links to their homepages. Thanks!
>
The homepages would be rather difficult but the list is easy - just look
at the file MANIFEST in the distribution directory and check the lines
that begin with 'ext' or 'lib'.
The MANIFEST file can probably be found on CPAN somewhere
<http://www.cpan.org>
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Tue, 16 Nov 1999 22:46:44 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl Array close command on Windows
Message-Id: <o9lY3.19560$YI2.844142@typ11.nn.bcandid.com>
In article <3831a6f1$0$96888@news.execpc.com>,
Larsen <redrum@execpc.com> wrote:
>I'm just learning perl and I can't figure out the DOS command to close a
>perl array when I'm running a script. ^Z and ^D don't work. Please help!!!
I don't understand your question. You can't close an array. Generally
an array literal -- really a list -- is terminated with ) or ], but it
doesn't need to be. ^Z and ^D are handy as end-of-file characters when
you're reading input from the console.
--
<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: Tue, 16 Nov 1999 14:41:49 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: PERL script with JScript embedded
Message-Id: <3831DDAD.173897C0@mail.cor.epa.gov>
Mark Henderson wrote:
>
> I am fairly new to Javascript . I have a PERL script (written by
> someone else) that acts both as a form handler and database connection
> interface. I need to modify this PERL script. THE HTML form that calls
> the script is fine, and the script currently just returns the $Msg
> listed below if a field is left blank. I want to insert a JavaScript
> alert in place of the $Msg statement below. I tried something like
>
> <SCRIPT LANGUAGE = "JAVASCRIPT">
> alert("You left a field blank");
> </SCRIPT>
>
> in place of the $Msg line below, but the server spit up on it.
It doesn't sound like you need to modify the Perl script.
It sounds more like you need to modify your Javascript code, or
else to modify your server config. Both of those issues are
better addressed in other newsgroups, so I'll let you get going.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 15 Nov 1999 22:54:10 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Scripts for NT
Message-Id: <80q2ui$2d3$1@gellyfish.btinternet.com>
On Mon, 15 Nov 1999 13:33:55 -0800 test test wrote:
> Hi,
>
> I'm looking for some free perl scripts that are already ported to NT. If
> you could refer me to some good sources it would be greatly appreciated.
>
What trouble are you having with the wide variety of scripts available
all over the place on the web : of course bearing in mind what it says
in the perlport manpage.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 15 Nov 1999 22:24:59 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Wizards
Message-Id: <80q17r$2cv$1@gellyfish.btinternet.com>
On 12 Nov 1999 14:20:08 -0500 David H. Adler wrote:
> On Wed, 10 Nov 1999 16:55:16 -0800, David Cassell
> <cassell@mail.cor.epa.gov> wrote:
>
>>But I don't consider myself a Perl wizard. Just a satisfied
>>customer. Abigail, Larry, Uri, Damian... They're wizards.
>
> I'm a Perl Druid, if that's any help. :-)
>
If only I'd known - I went to Stonehenge yesterday - I'd have put in a
good word for you ...
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Tue, 16 Nov 1999 22:53:10 GMT
From: jsander0@my-deja.com
Subject: perl/tk and dbi/rdbms
Message-Id: <80sn8k$o7n$1@nnrp1.deja.com>
Hello Everybody,
I am new to this community, and I am just kind of a mediocre perl guy.
Would you mind helping me with these questions or can you give me a hint
which community I should post:
I want to create a rdbms table viewer/editor: Using Tk::Table is really
slow and I don't need the ability to treat every cell as a separate
widget. Also, I would like to limit and change the width of columns on
creation and on the fly.
Is there something more suitable to get this job done than Tk::Table?
In order to edit records, it would be nice to use cursors. Is there a
cursor concept available with dbi? I couldn't find any hint to that end.
Thanks for any hints
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 16 Nov 1999 12:24:27 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Please help me create a file with perl
Message-Id: <x3yemdqqrhx.fsf@tigre.matrox.com>
avivA Starkman <aviva.starkman@exchange.sp.trw.com> writes:
> > My script:
> >
> > #!/usr/bin/perl
> > open(FILE,">>jonas") \n";
> > print FILE"Test\n";
> > close(FILE);
> > `chmod 666 jonas`;
>
> The second line should read:
> open(FILE,">>jonas");
Actually, it should be:
open(FILE, ">>jonas") or die "jonas : $!\n";
Error checking is always a good idea.
--Ala
------------------------------
Date: 15 Nov 1999 22:58:37 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Please help me create a file with perl
Message-Id: <80q36t$2d9$1@gellyfish.btinternet.com>
On Mon, 15 Nov 1999 18:43:40 GMT Jonas Nilsson wrote:
> Hello.
> I don't know so much perl. I think a script that create a file should
> look something like this, but I get a Internal Server Error all the
> time. Does anyone know what's wrong please tell me. Thanks.
>
Please read the very first item in perlfaq9 to see what it says about
'Internal Server Error'.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Tue, 16 Nov 1999 21:03:40 GMT
From: jonas.nilsson@mbox326.swipnet.se (Jonas Nilsson)
Subject: Re: Please help me create a file with perl
Message-Id: <3832c675.79990726@news1.tninet.se>
Thanks for the help but I have tried every advise but it still don't
work. Any more tips ?
>Hello.
>I don't know so much perl. I think a script that create a file should
>look something like this, but I get a Internal Server Error all the
>time. Does anyone know what's wrong please tell me. Thanks.
>
>My script:
>
>#!/usr/bin/perl
>open(FILE,">>jonas") \n";
>print FILE"Test\n";
>close(FILE);
>`chmod 666 jonas`;
>
>Thanks
>Jonas
------------------------------
Date: Tue, 16 Nov 1999 21:07:01 GMT
From: jonas.nilsson@mbox326.swipnet.se (Jonas Nilsson)
Subject: Re: Please help me create a file with perl
Message-Id: <3833c702.80132571@news1.tninet.se>
I have tried everything now but I still get Internal Server Error. It
create the file and set the right permission but I get the error.
More tips thanks.
Jonas Nilsson
On Mon, 15 Nov 1999 18:43:40 GMT, jonas.nilsson@mbox326.swipnet.se
(Jonas Nilsson) wrote:
>Hello.
>I don't know so much perl. I think a script that create a file should
>look something like this, but I get a Internal Server Error all the
>time. Does anyone know what's wrong please tell me. Thanks.
>
>My script:
>
>#!/usr/bin/perl
>open(FILE,">>jonas") \n";
>print FILE"Test\n";
>close(FILE);
>`chmod 666 jonas`;
>
>Thanks
>Jonas
------------------------------
Date: 16 Nov 1999 22:01:54 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Problem with glob on NT host
Message-Id: <80sk8i$36k$1@gellyfish.btinternet.com>
On Tue, 16 Nov 1999 11:07:25 -0500 Dennis Kowalski wrote:
>
> So the question is
> Why does the glob convert a name to all upper case if the 1st letter is a
> capital letter and none of the others are?
>
I cant see anywhere in the code that would do this - you might do a simple
experiment using opendir(), readdir() to see what they return for these. I
do recall seeing certain programs creating filenames which respected case
and others not doing but I cant remember the circumstances.
> I am running ActiveWare build 315 on a NT 4.0 host
>
I would upgrade that as it is now very very old, get the latest ( build
522 ?) from <http://www.activestate.com> and try again and see what happens.
/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 09:58:23 +1100
From: Iain Waugh <iain@zip.com.au>
Subject: Re: Q: Dodgy use of undef on global variables?
Message-Id: <Pine.LNX.4.10.9911170941580.15618-100000@zipperii.zip.com.au>
> IW> The answer is yes (I've done it), but are there any nasty side-effects
> IW> that I should be aware of?
> >> no you haven't. and you shouldn't use undef on aggregates. it has no
> >> proper meaning for most programs.
Apologies for the poor sample code - it was deliberately short because
I'm typing over a slow tty and I'm short on time.
I wanted a quick (CPU and memory efficient) way to erase %hashvar and
fill it with something else.
Your solution of setting '%hashvar = ()' will do what I intended and
gets around any undefining/recreating issues that I may have had.
Thanks,
--
. . Iain Waugh
. o ._o .o \#/. o. o_. o . iain@zip.com.au
`) /\ =) .-kai- )= /\ )' http://www.zip.com.au/~iain
/< < < /#\ . > > >\ :.::.:TAG.:.::.
.
------------------------------
Date: Tue, 16 Nov 1999 22:43:21 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Q: how to get tied variable within FETCH
Message-Id: <d6lY3.19557$YI2.842161@typ11.nn.bcandid.com>
In article <Pine.GSO.4.10.9911151740560.15797-100000@user2.teleport.com>,
Tom Phoenix <rootbeer@redcat.com> wrote:
>At least one of us is confused. Let me give a concrete example.
Well, it doesn't look like you're confused, unless you and I are
confused in the same way. What makes you think Ken is confused?
> my $dino = $wilma{'some key'};
>
>Now, you seem to be saying that you want %wilma to be the value which will
>land in $dino. No?
It sounds like he wants something like
[...{...[...[\\\\{... 'somekey' => \%wilma . . .}...]...]...}..] to
land in $dino. So yes.
--
<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: 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 1399
**************************************