[17082] in Perl-Users-Digest
Perl-Users Digest, Issue: 4494 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 2 18:07:09 2000
Date: Mon, 2 Oct 2000 15:06:30 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <970524390-v9-i4494@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 2 Oct 2000 Volume: 9 Number: 4494
Today's topics:
?? wait for a browser response (Steve A.)
Re: Add on <lr@hpl.hp.com>
Re: benefits of arrays over hashes(associative arrays) <hartleh1@westat.com>
Re: benefits of arrays over hashes(associative arrays) <jeffp@crusoe.net>
Re: benefits of perl <nospam@david-steuber.com>
Camel III <nospam@david-steuber.com>
Can someone please help me?!?! suzbik@my-deja.com
CGI Programmers proficient with Perl sought! <igor@igstudio.net>
Re: CGI trouble (Steve A.)
Re: create JavaScipt source file with perl <nospam@jillanddirk.com>
Re: create JavaScipt source file with perl <jeff@vpservices.com>
Re: create JavaScipt source file with perl <flavell@mail.cern.ch>
Re: create JavaScipt source file with perl <jeff@vpservices.com>
Re: create JavaScipt source file with perl <gene@allsysinc.com>
Re: create JavaScipt source file with perl <sariq@texas.net>
Re: create JavaScipt source file with perl <flavell@mail.cern.ch>
Re: create JavaScipt source file with perl <sariq@texas.net>
Re: create JavaScipt source file with perl <gene@allsysinc.com>
Re: create JavaScipt source file with perl <gene@allsysinc.com>
Re: create JavaScipt source file with perl <jeff@vpservices.com>
Crypt::Rijndael? (Mathew A. Hennessy)
Re: die() ignores tied STDERR? (Ilya Zakharevich)
Re: Executing exe from webpage (Steve A.)
Re: Files and things <tim@ipac.caltech.edu>
Re: finding the structure of a hash <hartleh1@westat.com>
Flush buffer and wait for browser input ?? (Steve A.)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 26 Sep 2000 19:25:38 GMT
From: sarbayo@telis.org (Steve A.)
Subject: ?? wait for a browser response
Message-Id: <39d0eeaa.3993047@news.inreach.com>
Hi,
The question is simple;
" how do I make a perl CGI program wait for input from the
browser, to take it's next action , prior to program termination"
?
From a console I/O run application it's pretty simple;
" $input = <STDIN>; # wait for keyboard input "
" do something($input); # next line of code; "
program waits for <stdin> input.
Scenario:
1) browser calls " ...com/cgi-bin/Programme.pl ", using a standard
"POST" method, sending user's login info,
2) " cgi-bin/Programme.pl " executes, sending response back to
browser proper header and HTML code,
3) " cgi-bin/Programme.pl " goes into a "wait loop", waiting
for next input from browser.
Problem:
a) I/O buffer does not flush.
b) Browser does not get updated info before "wait loop" times-out
and "Programme.pl" terminates.
c) On "Programme.pl" termination I/O buffer is flushed, but,
it's too late, ,, "Programme.pl" is dead.
Solution ??
Thanks,
Steve A.
------------------------------
Date: Mon, 2 Oct 2000 12:30:01 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Add on
Message-Id: <MPG.14428218f79882398adec@nntp.hpl.hp.com>
In article <u9aecngnrk.fsf@wcl-l.bham.ac.uk> on 02 Oct 2000 18:23:59
+0100, nobull@mail.com <nobull@mail.com> says...
> kily@my-deja.com writes:
...
> perl -pe 's/.*\s+..(.*)/\L$1/' <infile >outfile
>
> > PS: I'm workong under Windows NT Server 4.
>
> Oh, then command line may not work:
>
> #!perl -p
> s/.*\s+..(.*)/\L$1/
The command-line version will work if double-quotes are used instead of
single-quotes.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 02 Oct 2000 16:12:32 -0400
From: Henry Hartley <hartleh1@westat.com>
Subject: Re: benefits of arrays over hashes(associative arrays) and vice versa
Message-Id: <39D8EC30.D4304D64@westat.com>
"Godzilla!" wrote:
> Incidently Randal, only hyphenate number
> combinations, not number and word
> combinations.
>
> "seven syllable"
> "one syllable"
>
> This is more stylish and easier on the eyes.
From Merriam-Webster:
Main Entry: four-letter
Function: adjective
Date: 1897
: of, relating to, or being four-letter words
> You didn't 'got tired', you 'became tired'.
> You can get a red line pencil. You cannot
> get a non-physical item, unless you are
> Dr. Timothy Leary.
You just don't get^H^H^Hbecome it do you?
--
Henry Hartley
------------------------------
Date: Mon, 2 Oct 2000 16:32:37 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: benefits of arrays over hashes(associative arrays) and vice versa
Message-Id: <Pine.GSO.4.21.0010021632200.14163-100000@crusoe.crusoe.net>
On Oct 2, Henry Hartley said:
>"Godzilla!" wrote:
>> You didn't 'got tired', you 'became tired'.
>
>You just don't get^H^H^Hbecome it do you?
(Henry Hartley)++
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Mon, 02 Oct 2000 18:11:09 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Re: benefits of perl
Message-Id: <m3zoknxgeb.fsf@solo.david-steuber.com>
mgjv@tradingpost.com.au (Martien Verbruggen) writes:
' Oh, come on... You're not going to say that CPAN is worth mentioning,
' are you? Everyone knows that CTclAN is much, much larger.
'
' PS. For the sarcasm-impaired: ;)
When I first looked at Tcl, I thought perhaps I found a language that
would be more useful to me than Perl. At the time, I knew even less
Perl than I know now. I thought that the Tcl langauge had much nicer
syntax and was somehow cooler until I realized I was more easily able
to figure out how to do things with Perl than I was with Tcl. The
same is true with Python, except that I ***hate*** using indentation
for blocks. I really prefer the {} method. I also _like_ to end my
statements with the ; character. Perhaps this is an old habit from
C++.
With Perl, I can also look to CPAN (or ask about modules on
clp.modules or clp.misc) to do things. Tcl has extensions, but not
nearly so many. And if a module to do what I want does not exist, or
I don't like the ones that do exist, I can always hit the perlmod docs
and write my own module. In theory anyway. So far, I've done only
pure Perl modules with few functions and no actual OO stuff. I gotta
get those perlrefs down.
Even with my limited knowledge of Perl, I can brute force solve a lot
of problems with it. It is C like enough that I can almost pretend it
is C. My only problem with that is forgetting to use the $ in my
scaler variable names rather frequently.
For me, the benefits of Perl are rather obvious. I can learn to do
things with it *quickly*. And the performance of Perl is pretty
impressive too. So far, I've mostly been IO bound and not CPU bound.
Perl may look ugly to start, but it grows on you with time.
I would tell the original poster to look at for comparisons of
scripting languages like Tcl, Python, and Perl. Then look at what you
want to do. My guess is that Perl will come out on top. I've got
limited brain power, so I am not bothering to even try to learn Tcl or
Python anymore. I am concentrating on Perl.
--
David Steuber | Perl apprentice, Apache/mod_perl user,
NRA Member | and general Internet web wannabe.
ICQ# 91465842
*** http://www.david-steuber.com/ ***
------------------------------
Date: Mon, 02 Oct 2000 18:20:53 GMT
From: David Steuber <nospam@david-steuber.com>
Subject: Camel III
Message-Id: <m3wvfrxfy3.fsf@solo.david-steuber.com>
I have the 2nd Ed of "Programming Perl". Is really worth upgrading to
the third edition? Or can I get by on the perldocs?
Does the Camel elucidate the perldocs in any way I might find more
meaningful than asking the group?
If I wasn't on a really tight budget right now, I would go ahead and
just buy the new book. And maybe I will in the future if my cash flow
improves.
--
David Steuber | Perl apprentice, Apache/mod_perl user,
NRA Member | and general Internet web wannabe.
ICQ# 91465842
*** http://www.david-steuber.com/ ***
------------------------------
Date: Mon, 02 Oct 2000 18:11:07 GMT
From: suzbik@my-deja.com
Subject: Can someone please help me?!?!
Message-Id: <8raj3k$9t$1@nnrp1.deja.com>
Hi,
I have set up Apache and all the rest on my computer and it is working
fine. I decided I would try and write a script that would enable me to
automatically add new virtual domains. However it doesnt work. If i
check the error log it says: [Mon Oct 02 18:52:05 2000] [error] [client
127.0.0.1] (2)No such file or directory: couldn't spawn child process:
c:/phpdev/www/cgi-bin/virtual.pl
can someone have a look and tell me whats wrong?
thanks a lot
Ben Periton
Here is the code:
#!c:/phpdev/perl/perl.exe
# Path to the windows file (again, no trailing slash!)
$hdd = "C:/win98";
# The URL that the script will be run from
$url = "http://www.cystrix.co.uk/cgi-bin/virtual.pl";
########################################################################
########
# Do not edit below this line!! (unless you know wot u
doin!) #
########################################################################
########
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/,$buffer);
foreach $pair(@pairs) {
($name, $value) = split(/=/,$pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
$command = $FORM{'command'};
$domain = $FORM{'domain'};
$server = $FORM{'server'};
$ip = $FORM{'ip'};
if($command eq "create"){
&record;
}
sub virtual{
open (VIRTUAL, ">>C:/phpdev/apache/conf/httpd.conf") || die "Whoopsy
Doodle! I can't open the file: $!";
print VIRTUAL "<VirtualHost $ip>\n";
print VIRTUAL "ServerName $server.$domain\n";
print VIRTUAL "DocumentRoot $base/$server\n";
print VIRTUAL "</VirtualHost>\n\n";
close(VIRTUAL);
&hosts;
}
sub hosts{
open(HOSTS, ">>$hdd/hosts") || die "Whoopsy Doodle! I can't open the
file: $!";
print HOSTS "$ip\t$server.$domain\n";
close(HOSTS);
&directory;
}
sub directory{
mkdir("C:/phpdev/www/$server") || die "Whoopsy Doodle! I can't
make the dir: $!";
&record;
}
sub record{
open (LIST, ">>C:/phpdev/apache/virtual.list") || die "Whoopsy Doodle!
I can't open the file: $!";
print LIST "<tr>\n";
print LIST "<td><font face="Arial" size="2"
color="#800000">$ip</font></td>\n";
print LIST "<td><font face="Arial" size="2"
color="#800000">$server</font></td>\n";
print LIST "<td><font face="Arial" size="2"
color="#800000">$domain</font></td>\n";
print LIST "<td><font face="Arial" size="2"
color="#800000">$base/$server/</font></td>\n";
print LIST "</tr>\n";
close(LIST);
&complete;
}
sub complete{
print qq~
<html>
<head>
<title>Proggie to add new virtual hosts</title>
</head>
<body>
<font face="Arial" size="2">
The following has been added:<br><br>
$server $domain $ip $base/$server
</font>
</body>
</html>
~;
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 2 Oct 2000 23:06:46 +0200
From: "e-g.o.r-e" <igor@igstudio.net>
Subject: CGI Programmers proficient with Perl sought!
Message-Id: <8rat7h$1gt$1@spectra.a2000.nl>
Our fast developing company is getting more and more jobs and we need more
people.
We are looking for freelancers, preferably from the area of Netherlands,
that are available
to start immediately.
For more information write to igor@igstudio.net.
Igor
------------------------------
Date: Sat, 30 Sep 2000 22:17:09 GMT
From: sarbayo@telis.org (Steve A.)
Subject: Re: CGI trouble
Message-Id: <39d66195.1458698@news.inreach.com>
On Sat, 30 Sep 2000 17:43:03 GMT, Rand25@juno.com wrote:
>I just installed Apache Server for Win32, and it seems to work fine,
?? if it's working fine, then ???
at what point does the problem come in ??
Did a sample program or html file come with your setup ?
So that, on execution, a menu of cgi programs comes up, to test
your install ?
If so, this will tell you if things are working or not.
>but I cant access my cgi-bin directory to test a cgi script (test.cgi).
>I tried http://localhost/cgi-bin/test.cgi, but I got an internal error.
The exact error message is required !!
By default, your root directory will look like :
" http://localhost/4444/ "
or something, but,
will actually be :
" http://localhost/4444/htdocs/ "
>What url should I use, and is there a way to browse my new "IntraNet"
>without having to type localhost....its kinda long, and I'm really lazy.
>I'm running Windows 98 and Apache 1.3.12.
You have to drop down to a DOS window to access it, just as normal.
The Apache Server is a sort of shell, or emulator, running in the
background, to execute perl and run your perl scripts.
You don't actually access it, like a Unix or Linux shell.
It's transparent.
In your /cgi-bin/ place a small " hello.pl " script.
On your browser's "Location Bar", that's this thing:
== " http://localhost/4444/" ==
have it read :
" http://localhost/4444/cgi-bin/hello.pl "
press enter.
It should execute your hello.pl script.
*(your "4444" may be different)
If not,,,, copy down the exact error message and re-post it here...
Steve
------------------------------
Date: Mon, 2 Oct 2000 14:30:01 -0400
From: "dirk" <nospam@jillanddirk.com>
Subject: Re: create JavaScipt source file with perl
Message-Id: <8rak70$je0$1@merrimack.Dartmouth.EDU>
Thanks for your reply. The one thing I don't know is the perl part. Is the
following correct?:
+++++++++++++++
open(FILE,">var.js") or die("Couldn't open var.js\n");
print FILE "five=5;\n";
print FILE "ten=10;\n";
print FILE "twenty=20;\n";
close(FILE);
chmod(0644,var.js);
++++++++++++++++++
"Jeff Zucker" <jeff@vpservices.com> wrote in message
news:39D8C750.70882C7F@vpservices.com...
> dirk wrote:
> >
> > In order to pass variable from a CGI script to JavaScript I thought of
> > using an external source file (*.js). In this file I can store
variables
> > from my CGI script that can be accessed by JavaScript.
> >
> > Has anyone done this
>
> Yes.
>
> > and does it work?
>
> Yes.
>
> > If so is their an example available
> > that I can have a look at? I know how to read a *.js file with
javascript
> > but do not know enough to write a *.js file with perl.
>
> There is absolutely no mystery. Figure out what you want the .js file to
> look like and have Perl print it. As far as Perl goes, it is just
> printing another file so whatever questions you might have about the
> process have to do with JavaScript and should be asked in a JavaScript
> related newsgroup. (unless, of course you do not know how to print a
> file in Perl, in which case, try any introductory tutorial or book and
> feel free to come back here if you have problems with that part of it).
>
> --
> Jeff
------------------------------
Date: Mon, 02 Oct 2000 12:03:11 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: create JavaScipt source file with perl
Message-Id: <39D8DBEF.25BFCB69@vpservices.com>
dirk wrote:
>
> Thanks for your reply. The one thing I don't know is the perl part. Is the
> following correct?:
>
> +++++++++++++++
> open(FILE,">var.js") or die("Couldn't open var.js\n");
> print FILE "five=5;\n";
> print FILE "ten=10;\n";
> print FILE "twenty=20;\n";
> close(FILE);
> chmod(0644,var.js);
> ++++++++++++++++++
Looks good! That's very close. The only actual error is that you don't
have quote marks around the "var.js" in the last line. It could be
improved by adding "$!" to the die statement on the first line ($! tells
what the open error is if there is one) and by adding a similar die
statement on the close(FILE) line.
--
Jeff
------------------------------
Date: Mon, 2 Oct 2000 21:20:08 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: create JavaScipt source file with perl
Message-Id: <Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch>
On Mon, 2 Oct 2000, Jeff Zucker wrote:
> > print FILE "five=5;\n";
> > print FILE "ten=10;\n";
> > print FILE "twenty=20;\n";
> Looks good! That's very close.
[...]
No argument with what you said; but it's a natural for a
Here-document, surely?
print FILE <<EIEIO;
file=5
ten=10
twenty=20
EIEIO
Much clearer, less to type, less chance for making errors.
------------------------------
Date: Mon, 02 Oct 2000 13:14:30 -0700
From: Jeff Zucker <jeff@vpservices.com>
To: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: create JavaScipt source file with perl
Message-Id: <39D8ECA6.E91033FA@vpservices.com>
"Alan J. Flavell" wrote:
>
> On Mon, 2 Oct 2000, Jeff Zucker wrote:
>
> > > print FILE "five=5;\n";
> > > print FILE "ten=10;\n";
> > > print FILE "twenty=20;\n";
>
> > Looks good! That's very close.
> [...]
>
> No argument with what you said; but it's a natural for a
> Here-document, surely?
>
> print FILE <<EIEIO;
> file=5
> ten=10
> twenty=20
> EIEIO
>
> Much clearer, less to type, less chance for making errors.
Yep.
--
Jeff
------------------------------
Date: Mon, 02 Oct 2000 20:20:01 GMT
From: "Gene" <gene@allsysinc.com>
Subject: Re: create JavaScipt source file with perl
Message-Id: <R56C5.873$Kc.89519@news.flash.net>
Oops! Looks like you missed the semicolon at the end of the lines. I know
that's not an issue here, as it is a javascript issue, but just thought I'd
point that out. So much for the 'less chance for making errors'
"Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
news:Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch...
> No argument with what you said; but it's a natural for a
> Here-document, surely?
>
> print FILE <<EIEIO;
> file=5
> ten=10
> twenty=20
> EIEIO
>
> Much clearer, less to type, less chance for making errors.
>
------------------------------
Date: Mon, 02 Oct 2000 20:41:19 GMT
From: Tom Briles <sariq@texas.net>
Subject: Re: create JavaScipt source file with perl
Message-Id: <39D8F2EF.9520DE81@texas.net>
[ Please place your response *after* the quoted text. This is Usenet,
not Jeopardy. ]
Gene wrote:
>
> "Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
> news:Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch...
> > No argument with what you said; but it's a natural for a
> > Here-document, surely?
> >
> > print FILE <<EIEIO;
> > file=5
> > ten=10
> > twenty=20
> > EIEIO
> >
> > Much clearer, less to type, less chance for making errors.
> >
>
> Oops! Looks like you missed the semicolon at the end of the lines. I know
> that's not an issue here, as it is a javascript issue, but just thought I'd
> point that out. So much for the 'less chance for making errors'
Huh? Do you know what a 'here doc' is? Perhaps you should learn a bit
more before attempting to correct others.
- Tom
------------------------------
Date: Mon, 2 Oct 2000 22:29:18 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: create JavaScipt source file with perl
Message-Id: <Pine.GHP.4.21.0010022221110.27436-100000@hpplus03.cern.ch>
On Mon, 2 Oct 2000, Gene jeopardized:
> Oops! Looks like you missed the semicolon at the end of the lines.
Oh, sorry, I see what you mean. I misread the original.
|| print FILE "five=5;\n";
That's one semicolon for perl (outside the quotes, and not needed in
the here-document), and one inside, as part of the data (which in this
case is supposed to be a javascript statement), which I should've
retained. Well spotted.
------------------------------
Date: Mon, 02 Oct 2000 20:47:38 GMT
From: Tom Briles <sariq@texas.net>
Subject: Re: create JavaScipt source file with perl
Message-Id: <39D8F46A.9C21E0DD@texas.net>
Tom Briles wrote:
>
> [ Please place your response *after* the quoted text. This is Usenet,
> not Jeopardy. ]
>
> Gene wrote:
> >
> > "Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
> > news:Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch...
> > > No argument with what you said; but it's a natural for a
> > > Here-document, surely?
> > >
> > > print FILE <<EIEIO;
> > > file=5
> > > ten=10
> > > twenty=20
> > > EIEIO
> > >
> > > Much clearer, less to type, less chance for making errors.
> > >
> >
> > Oops! Looks like you missed the semicolon at the end of the lines. I know
> > that's not an issue here, as it is a javascript issue, but just thought I'd
> > point that out. So much for the 'less chance for making errors'
>
> Huh? Do you know what a 'here doc' is? Perhaps you should learn a bit
> more before attempting to correct others.
Whoops, my mistake. I see that you were likely referring to the
semi-colons within the quoted text.
Sorry!
- Tom
------------------------------
Date: Mon, 02 Oct 2000 20:50:05 GMT
From: "Gene" <gene@allsysinc.com>
Subject: Re: create JavaScipt source file with perl
Message-Id: <1y6C5.895$Kc.90768@news.flash.net>
"Tom Briles" <sariq@texas.net> wrote in message
news:39D8F2EF.9520DE81@texas.net...
> [ Please place your response *after* the quoted text. This is Usenet,
> not Jeopardy. ]
>
> Gene wrote:
> >
> > "Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
> > news:Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch...
> > > No argument with what you said; but it's a natural for a
> > > Here-document, surely?
> > >
> > > print FILE <<EIEIO;
> > > file=5
> > > ten=10
> > > twenty=20
> > > EIEIO
> > >
> > > Much clearer, less to type, less chance for making errors.
> > >
> >
> > Oops! Looks like you missed the semicolon at the end of the lines. I
know
> > that's not an issue here, as it is a javascript issue, but just thought
I'd
> > point that out. So much for the 'less chance for making errors'
>
> Huh? Do you know what a 'here doc' is? Perhaps you should learn a bit
> more before attempting to correct others.
>
> - Tom
Yes, I know exactly what I was talking about. I was simply stating how
javascript doesn't understand 'file=5'. It will only understand the line if
it is 'file=5;'. Without a semicolon, it hasn't got a clue what the hell you
are talking about. Perl-wise, it is perfectly valid code. Javascript-wise,
he screwed up the perfectly valid code originally given by dirk.
-gene
------------------------------
Date: Mon, 02 Oct 2000 20:50:46 GMT
From: "Gene" <gene@allsysinc.com>
Subject: Re: create JavaScipt source file with perl
Message-Id: <Gy6C5.896$Kc.91124@news.flash.net>
"Tom Briles" <sariq@texas.net> wrote in message
news:39D8F46A.9C21E0DD@texas.net...
> Tom Briles wrote:
> >
> > [ Please place your response *after* the quoted text. This is Usenet,
> > not Jeopardy. ]
> >
> > Gene wrote:
> > >
> > > "Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
> > > news:Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch...
> > > > No argument with what you said; but it's a natural for a
> > > > Here-document, surely?
> > > >
> > > > print FILE <<EIEIO;
> > > > file=5
> > > > ten=10
> > > > twenty=20
> > > > EIEIO
> > > >
> > > > Much clearer, less to type, less chance for making errors.
> > > >
> > >
> > > Oops! Looks like you missed the semicolon at the end of the lines. I
know
> > > that's not an issue here, as it is a javascript issue, but just
thought I'd
> > > point that out. So much for the 'less chance for making errors'
> >
> > Huh? Do you know what a 'here doc' is? Perhaps you should learn a bit
> > more before attempting to correct others.
>
> Whoops, my mistake. I see that you were likely referring to the
> semi-colons within the quoted text.
>
> Sorry!
>
> - Tom
No offense taken.
-gene
------------------------------
Date: Mon, 02 Oct 2000 13:56:03 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: create JavaScipt source file with perl
Message-Id: <39D8F663.13F640DF@vpservices.com>
Tom Briles wrote:
>
> [ Please place your response *after* the quoted text. This is Usenet,
> not Jeopardy. ]
>
> Gene wrote:
> >
> > "Alan J. Flavell" <flavell@mail.cern.ch> wrote in message
> > news:Pine.GHP.4.21.0010022113580.27436-100000@hpplus03.cern.ch...
> > > No argument with what you said; but it's a natural for a
> > > Here-document, surely?
> > >
> > > print FILE <<EIEIO;
> > > file=5
> > > ten=10
> > > twenty=20
> > > EIEIO
> > >
> > > Much clearer, less to type, less chance for making errors.
> > >
> >
> > Oops! Looks like you missed the semicolon at the end of the lines. I know
> > that's not an issue here, as it is a javascript issue, but just thought I'd
> > point that out. So much for the 'less chance for making errors'
>
> Huh? Do you know what a 'here doc' is? Perhaps you should learn a bit
> more before attempting to correct others.
Gene was referring to the JavaScript semicolons, not the Perl
semicolons, so he's right! I almost jumped the gun like you did Tom,
but you beat me too and I had time to reflect :-)
--
Jeff
------------------------------
Date: Mon, 02 Oct 2000 22:02:34 -0000
From: hennessy@earl-grey.cloud9.net (Mathew A. Hennessy)
Subject: Crypt::Rijndael?
Message-Id: <sti1fqf9brrt0d@corp.supernews.com>
Considering that NIST has just selected the Rijndael algorithm for
the AES, I'm wondering if any Crypt::Rijndael module is available or in
the works? A scan of CPAN reveals negative, as well as a scan of the
newsgroups.. :p
Cheers,
- Matt
--
If it sounds too good to be true, it's probably Linux.
"Life is sweet, but revenge - more so." - BOFH
"You can never entirely stop being what you once were. That's why it's important
to be the right person today, and not put it off till tomorrow." - Larry Wall
------------------------------
Date: 2 Oct 2000 21:59:59 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: die() ignores tied STDERR?
Message-Id: <8rb0gv$lfl$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was NOT sent to Martien Verbruggen
<mgjv@tradingpost.com.au>],
who wrote in article <slrn8tgp4k.jr6.mgjv@martien.heliotrope.home>:
> > So why aren't C<warn> or C<die> following a C<tie>-ed STDERR?
> >
> > [~] $ perl -wle'sub TIEHANDLE {bless{}} sub PRINT {print "tied"}
> > tie *STDERR,"main"; warn "untied"'
> > untied at -e line 1.
>
> Possibly because warn and die use perl's internal stderr, or more
> directly, the file descriptor that goes with it. warn and die are not
> implemented as Perl code, but are part of perl's internals, and
> therefore don't need to pass their control through the Perl STDERR
> filehandle, but can directly work with the stderr or file descriptor 2.
>
> i don't _know_ that this is what is happening, but I can easily see that
> there is a potential large difference between STDERR and the channels
> warn and die use. Maybe there shouldn't be, but that's for the perl
> developers to decide.
Why? Perl developers should decide things basing on how things are
going to be *used*. It is the responsibility of users to bug the
developers about not-intuitive behaviour (if the behaviour is judged
not-intuitive by *users*).
Ilya
------------------------------
Date: Sat, 30 Sep 2000 22:48:38 GMT
From: sarbayo@telis.org (Steve A.)
Subject: Re: Executing exe from webpage
Message-Id: <39d669d4.3570509@news.inreach.com>
On Sat, 30 Sep 2000 21:18:03 GMT, Rand25@juno.com wrote:
>I cant seen to find a way to execute files from an html/javascript
>menu....is there a way to do it with CGI or inline Perl?
This has nothing to do with CGI or perl.
CGI is a communication method between browser and server application.
Perl is a server script interpreter.
> I want to have be able to run games and My Computer from a menu
>attached to my Active Desktop page.
Actually, what you are trying to do is run a Dos/Windows "EXE"
program, which resides on your local machine, from within your
"Browser", either IE or Netscape.
The Browser wasn't designed to act as a "shell" or platform in which
to "run" or " launch " other applications.
It would need to create another process to do that.
Unless it's an actual Java program or VisualBasic "Plug-in" that works
within the browser, it's not going to happen (gracefully).
There are tools out there to allow creating HTML menus to do what you
want to do.
These are "mini" offline browsers.
Try "shareware.com" .
Enter query "html tools" .or something like this.
------------------------------
Date: Mon, 02 Oct 2000 12:37:09 -0700
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: Files and things
Message-Id: <39D8E3E5.C5390CF@ipac.caltech.edu>
jon_uk@my-deja.com wrote:
> I have 2 small problems. I need to -
>
> - Find out what size (in bytes) a folder is. Basicly, I need to know
> the total size of /home/myname/cgi-bin (with the all the files etc).
>
> - How do I copy everything in a folder, to another area. This is for
> backing up everything. So I need to copy everything in /home/ to
> something like /home2/.
Neither of these are [Pp]erl questions. Even if I assume you meant to add "...
in a perl script" to the end of those questions, the easiest answer may still be
OS dependant: Both are easy to do with OS commands, but harder with perl. If you
must have a portable perl solution, the best I can do is suggest you go to
search.cpan.org and look for an appropriate set of modules.
Perhaps someone has already done that for their own purposes and will respond.
--
-- Tim Conrow tim@ipac.caltech.edu |
------------------------------
Date: Mon, 02 Oct 2000 15:45:04 -0400
From: Henry Hartley <hartleh1@westat.com>
Subject: Re: finding the structure of a hash
Message-Id: <39D8E5C0.3B15EB1A@westat.com>
Logan Shaw wrote:
>
> In article <39D67884.66AE3FB6@stomp.stomp.tokyo>,
> Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
> >Problem here is you boys are Language Lawyers who have
> >"use strict" tattooed on your brains. I am programmer
> >who knows a delimiter is what you define it to be.
>
> Yes, as Muffy Barkocy said in that quote I gave, we can define terms
> however we want, but it is only when we start to define terms in
> similar or equivalent ways that those terms start to actually be useful
> for the purposes of communication. (Defining terms differently and
> then trying to have any meaning isn't a great way to communicate,
> although it can be useful for amusement and even for thinking of new
> things and new ways to think of things.)
"When I use a word," Humpty Dumpty said in a rather a
scornful tone, "it means just what I choose it to
mean--neither more nor less."
--
Henry Hartley
------------------------------
Date: Wed, 27 Sep 2000 15:36:14 GMT
From: sarbayo@telis.org (Steve A.)
Subject: Flush buffer and wait for browser input ??
Message-Id: <39d2132b.2373034@news.inreach.com>
Hi,
The question is simple;
" how do I make a perl CGI program wait for input from the
browser, to take it's next action , prior to program termination"
?
From a console I/O run application it's pretty simple;
" $input = <STDIN>; # wait for keyboard input "
" do something($input); # next line of code; "
program waits for <stdin> input.
Scenario:
1) browser calls " ...com/cgi-bin/Programme.pl ", using a standard
"POST" method, sending user's login info,
2) " cgi-bin/Programme.pl " executes, sending response back to
browser proper header and HTML code,
3) " cgi-bin/Programme.pl " goes into a "wait loop", waiting
for next input from browser.
Problem:
a) I/O buffer does not flush.
b) Browser does not get updated info before "wait loop" times-out
and "Programme.pl" terminates.
c) On "Programme.pl" termination I/O buffer is flushed, but,
it's too late, ,, "Programme.pl" is dead.
Solution ??
Thanks,
Steve A.
------------------------------
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 4494
**************************************