[12951] in Perl-Users-Digest
Perl-Users Digest, Issue: 361 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 4 08:08:17 1999
Date: Wed, 4 Aug 1999 05:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 4 Aug 1999 Volume: 9 Number: 361
Today's topics:
Re: $/ for cross platform text files? <rolf@parallax.co.uk>
Re: $/ for cross platform text files? <flavell@mail.cern.ch>
Re: [offtopic]RE:Quot St and the Jeop Gm (Malcolm Ray)
Re: chdir isn't working when using a variable for the d alexander.zinniker@trivadis.com
Re: Escaping HTML tags <james.williamson@bbc.co.uk>
Re: Help making Perl on HP-UX 9.05 (Anno Siegel)
HELP: How to program command line args jarral@my-deja.com
Re: How can I know what modules are installed on server <gellyfish@gellyfish.com>
Re: how to check if scalar is blank? (Anno Siegel)
Re: How to create "function pointers"? <garethr@cre.canon.co.uk>
Re: how to remove cr/lf ??? (Bart Lateur)
Re: modifying vars in modules (Thomas Steininger)
Re: mySql & Perl -> Something simple (hoz)
Re: Need Help Understanding a perl script (Michel Dalle)
Newsgroup suggestion! was: Re: Perl CGI vs VB ASP (Dan Zetterstrom)
Re: Possible to get a HTML file from somewhere and use <gellyfish@gellyfish.com>
Problem: extracting terminology from text <dpleic@close.open.hr>
revert gmtime() <sachse@aeb.de>
Re: revert gmtime() <admin@futuristic.net>
Special delete (Jean-Pierre Sangin)
thanks for nothing everybody <tech1@magicnet.net>
Re: Useless error when {} unbalanced <garethr@cre.canon.co.uk>
Re: Working Telnet Script Needed <carvdawg@patriot.net>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 04 Aug 1999 11:53:12 +0100
From: Rolf Howarth <rolf@parallax.co.uk>
Subject: Re: $/ for cross platform text files?
Message-Id: <37A81B98.61DAACF4@parallax.co.uk>
Bart Lateur wrote:
>
> Abigail wrote:
>
> >%% I think that one reason for keeping it this way, is that performance for
> >%% reading lines would drop considerably, say to around 50% of what it is
> >%% now, even for the common case where $/ is just plain text. That would
> >%% put it in the same range as what you get now, but ALWAYS.
> >
> >What makes you think it will take such a huge performance hit?
>
> Don't shoot the messenger! This subject has been brought up on the
> MacPerl mailing list quite a few times in the past already. After all,
> it's far more likely for a Mac to have to process Unix files, than vice
> versa. I was always in favor of changing $/ to a regex. But Matthias,
> the prime person behind the Mac port, reported always having hit a brick
> wall whenever he brought this up with Perl-Porters.
That may be right, but I don't think this is a Perl porting issue. There
are certainly lots of situations where Unix or Windows versions of Perl
might encounter a Mac text file. Think HTML and HTTP for example, all
the relevant RFCs state that any of \012, \015 or \015\012 are equally
valid as end of line delimiters. Likewise I had someone else's script
(pstotext I think) fall over when it encountered a perfectly legitimate
postscript document that just happened to have come from a different
platform.
It's unfortunate that the workaround (reading the start of your file to
determine its type then rewinding it and setting $/) is both inelegant
and cumbersome (especially if you need to retrofit it to other people's
scripts), nor will it work if you're reading from a pipe. Especially
when you consider how easy it would be if breaking lines on any of these
characters were defined to be the default behaviour of Perl.
-Rolf
------------------------------
Date: Wed, 4 Aug 1999 13:20:26 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: $/ for cross platform text files?
Message-Id: <Pine.HPP.3.95a.990804130838.4048E-100000@hpplus03.cern.ch>
On Wed, 4 Aug 1999, Rolf Howarth wrote:
> are certainly lots of situations where Unix or Windows versions of Perl
> might encounter a Mac text file. Think HTML and HTTP for example, all
> the relevant RFCs state that any of \012, \015 or \015\012 are equally
> valid as end of line delimiters.
You're not comparing like with like.
It is (or at least it _should_ be) quite a different situation whether
you are processing a properly-formed text file[1] on your platform (in
which case you _should_ be opening it in text mode and applying
constructs like \n for newlines - irrespective of their physical
representation on your platform) on the one hand, or on the other hand
you are processing network-format datastreams, where the sequences of
\015 and \012 characters should be handled for what they are, and not
under some platform-dependent semantics[2].
[1]This assumes of course that cross-platform transfers of text files
are done properly, converting the character encoding and the newline
representation as necessary, so that they land up on the other platform
as proper text files according to the rules of that plaform.
[2]If you want to "front" the nitty details of the network formats with
some lower-level routines, that return nice clean platform-format text
records to your higher level processing, then that's just great. But
don't mix chalk with cheese, it's sure to cause indigestion sooner or
later.
> Likewise I had someone else's script
> (pstotext I think) fall over when it encountered a perfectly legitimate
> postscript document that just happened to have come from a different
> platform.
Hmmm, IBM mainframe postscript had (which way around was it?) EBCDIC
postscript commands containing ASCII data, or was it vice versa. Loads
of fun.
------------------------------
Date: 4 Aug 1999 10:10:26 GMT
From: M.Ray@ulcc.ac.uk (Malcolm Ray)
Subject: Re: [offtopic]RE:Quot St and the Jeop Gm
Message-Id: <slrn7qg4ci.2o0.M.Ray@carlova.ulcc.ac.uk>
On 03 Aug 1999 22:58:56 -0600, llornkcor <llornkcor@llornkcor.com> wrote:
>[1]- The FAQ's are hopelessly inept. ( my opinion) About as bad as
>Microsofts documentation. When I say that, I mean that it's about as
>hard to find what I want as this newsgroup.
Quoting from perlfaq:
How to contribute to this document
You may mail corrections, additions, and suggestions to
perlfaq-suggestions@perl.com . This alias should not be
used to ask FAQs. It's for fixing the current FAQ. Send
questions to the comp.lang.perl.misc newsgroup.
Have you done this?
--
Malcolm Ray University of London Computer Centre
------------------------------
Date: Wed, 04 Aug 1999 09:12:58 GMT
From: alexander.zinniker@trivadis.com
Subject: Re: chdir isn't working when using a variable for the directory
Message-Id: <7o906m$1t7$1@nnrp1.deja.com>
> I need to be able to change directory to the value represented by a
variable.
>
> #!/opt/perl5/bin/perl
> $tmpdir = "tmp";
> chdir('$tmpdir');
^ ^
| |
It will work if you remove this single quotes.
--Alex
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 4 Aug 1999 10:50:54 +0100
From: "James Williamson" <james.williamson@bbc.co.uk>
Subject: Re: Escaping HTML tags
Message-Id: <7o92gi$38j$1@nntp0.reith.bbc.co.uk>
Abigail wrote in message ...
>Larry Rosler (lr@hpl.hp.com) wrote on MMCLXIV September MCMXCIII in
><URL:news:MPG.12115cf7e10060d3989db0@nntp.hpl.hp.com>:
>\\ In article <slrn7qf7ep.s67.abigail@alexandra.delanet.com> on 3 Aug 1999
>\\ 20:57:17 -0500, Abigail <abigail@delanet.com> says...
>\\ >
>\\ > You're looking for a subroutine that does the work of a 10 char Perl
progra
>\\
>\\ OK. I give up. Here's the best I can do at this golf game:
>\\
>\\ #!/usr/local/bin/perl -w
>\\ use strict;
>\\
>\\ $_ = '"x<y>z&w"';
>\\
>\\ s/["&<>]/&#${\ord$&};/g; # 24 characters
>\\
>\\ print;
>\\
>\\ $_ = '"x<y>z&w"';
>\\
>\\ my %h =
>\\ ('"' => '"', '&' => '&', '<' => '<', '>' => '>' );
>\\
>\\ s/./$h{$&}||$&/eg; # 18 characters (plus the hash initialization)
>\\
>\\ print;
>\\ __END__
>\\
>\\ Neither of those comes even near to 10 characters. I give up.
>
>
>perl -wi -pe 's.<.<.g' file
> 0123456789
>
>
>There's never a need to escape " or > if the effect you are after is
>to make HTML tags visible. Knowing the field you play on helps in both
>golf and Perl golf. ;-)
>
>
>
>Abigail
>--
As you so often rightly stress, you can find it all in the perl
documentation;
perldoc perlrun.
James
------------------------------
Date: 4 Aug 1999 11:50:14 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help making Perl on HP-UX 9.05
Message-Id: <7o99dm$c61$1@lublin.zrz.tu-berlin.de>
Matthew Cline <mcline@rainbow.com> wrote in comp.lang.perl.misc:
>I'm trying to compile Perl 5.004_01 on an HP-UX 9.05 system.
>'uname -a' gives:
>
> HP-UX polonius A.09.05 A 9000/712 2004597975
>
>configure goes fine until it tries to run makedepnd; it then goes into
>an infinite recursion of calling itself, over and over, until it uses
>up all of the slots in the process table, and fork() fails.
>
>Unfortunatly, using any Perl other than 5.004_01 is not an option,
>although upgrading the HP machine to a higher OS version would be.
>However, I'd like to fix the thing with a minimum amount of fuss.
I just built 5.005_03 on HP-UX A.09.01 A 9000/755 with only minor
problems. You will need an unbundled cc though. The one that
comes with the system compiles the kernel, but not much else.
Anno
------------------------------
Date: Wed, 04 Aug 1999 10:59:54 GMT
From: jarral@my-deja.com
Subject: HELP: How to program command line args
Message-Id: <7o96f7$5so$1@nnrp1.deja.com>
Hi,
I am fairly new to PERL and quite a competent Shell Scripter and in
shell scripts you have $1 to $n for positional parameters on the command
line, how is this done in PERL? I have had a look at the FAQ but to no
avail and my PERL book (PERL from the Ground Up by Michael McMillan,
Osbourne) doesn't seem to mention it.
Any help will be much appreciated.
Regards
Masud
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 4 Aug 1999 10:35:31 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How can I know what modules are installed on server?
Message-Id: <37a80963_2@newsread3.dircon.co.uk>
99% Energy <dnor@hiline.net> wrote:
>
> I don't care if you get so offended because I include the quoting or after.
>
Unfortunately, the majority of the people who would actually give you
a useful answer care about the quoting style - your *opinion* is of no
relevance here: this is the way things are done.
It doesnt matter anyway - as I doubt if any of the people who care will
be seeing your posts anymore.
*plonk*
/J\
--
"Do you want to go to court today?" - BBC News Website
------------------------------
Date: 4 Aug 1999 09:35:46 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: how to check if scalar is blank?
Message-Id: <7o91hi$c1o$1@lublin.zrz.tu-berlin.de>
Paul Glidden <paul.glidden@unisys.com> wrote in comp.lang.perl.misc:
>I don't see what the problem is here, assign a value to the scalar at
>initialization that it will most likely never have, then test for this
>value.
To what part of my posting are you replying? Just slapping your
text in front of everything doesn't do.
There isn't any initialization shown in what you posted. And if
there were, assigning a value to the scalar that it will "most
likely" never have isn't good enough. It will break some day.
Anno
------------------------------
Date: Wed, 4 Aug 1999 10:27:14 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: How to create "function pointers"?
Message-Id: <siiu6v3kot.fsf@cre.canon.co.uk>
Tom Christiansen <tchrist@mox.perl.com> wrote:
> You mean to use a narrow there:
> $MyFunction->("test");
I suppose you could consider that this narrows the scalar to a
subroutine reference.
--
Gareth Rees
------------------------------
Date: Wed, 04 Aug 1999 11:33:38 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: how to remove cr/lf ???
Message-Id: <37aa208b.737917@news.skynet.be>
elephant wrote:
>
>if you have any documentation supporting your CRLF claim for NT then I'd
>like to see it .. in the absence of any I did some tests - have you
>tested this yourself ? .. it appears to use LF only
>
>in fact .. it does use LF only .. it understands CR+LF .. but if you open
>something with Notepad on NT and type some lines and hit your Return key
>at the ends of them .. then check the files .. they've only got LFs
Er... You tested it using Perl? Tada!
Perl will convert input read from files from CR+LF to "\n" (=LF) only,
and the other way when using print. If you want to prevent that
conversion, set binmode() on the file handle.
Bart.
------------------------------
Date: Wed, 04 Aug 1999 10:02:24 GMT
From: thomas.steininger@sdm.de (Thomas Steininger)
Subject: Re: modifying vars in modules
Message-Id: <37a80ea8.46540010@news.sdm.de>
On Tue, 03 Aug 1999 14:31:33 GMT, interuser@hotmail.com wrote:
>Hello
>I want to modify an array @a by calling a sub f from a module module
>
>ie
>i want module::f(\@a)
>to modify @a
Hi,
I would call it with module::f(@a) and then use the wantarray pragma
to determine if to modify it in place or to return it.
package module;
sub f {
my $array;
if (defined wantarray) {
$array = [@_]; # copy
} else {
$array = \@_; # modify in-place
}
<some code>
wantarray ? @$array : $array->[0];
}
Hope this helps.
Thomas
--
Thomas Steininger mailto:thomas.steininger@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 Muenchen, Germany
Tel +49 89 63812-781, Fax -490
------------------------------
Date: Wed, 04 Aug 1999 18:26:37 GMT
From: hoz@rocketmail.com (hoz)
Subject: Re: mySql & Perl -> Something simple
Message-Id: <37a88471.876875@news.netvision.net.il>
I think maybe your problem is your $statement and your PREPARE
try...
1. putting quotes around your $codeQuery
2. put quotes around your prepare
see below...
>$statement = "SELECT Part_Number, Description, Price \
> from master \
> where code = \"$codeQuery\"";
>
>$sth = $dbh->prepare(qq{$statement});
try printing your $statement and check the return code of $sth
just a hunch
-hoz
On Tue, 03 Aug 1999 19:20:58 GMT, mgcon@neta.com (Mike) wrote:
>With the help of some folks on this group a while back I was able to begin
>putting some cgi scripts together. Now I am stuck again.
>
>The script below works just fine (i.e runs without errors), however, it
>doesn't return any values. This problem surely has some simple resolution
>to it, I just can't see it.
>
>Can someone throw me a bone or two?!
>
>TIA
>Mike
>---------------------------------------------------
>#!/usr/bin/perl -w
>#---Define what is required---
>use DBI;
>use CGI;
>use CGI::Carp qw(fatalsToBrowser);
>
>#---Define Variables which require no input---
>$query = new CGI;
>$myHost = "localhost";
>$port = "3306";
>$drivername = "mysql";
>$myDb = "inventory";
>$myUser = "username";
>$myPasswd = "password";
>
>my $myFont = "<font color=\"#880000\">";
>my $logo = "<img src=/~mstarke/art/meg.jpg border=0>";
>
>$codeQuery = $query->param("codeQuery");
>
>$dsn = "dbi:$drivername:database=$myDb;host=$myHost;port=$port";
>$dbh = DBI->connect($dsn, $myUser, $myPasswd);
>
>$statement = "SELECT Part_Number, Description, Price \
> from master \
> where code = $codeQuery";
>
>$sth = $dbh->prepare($statement);
>
>$sth->execute;
>
>print "Content-type: text/html\n\n";
>sub printMe{
>print<<HTML;
> <html>
> <body bgcolor="#ffffff">
> <center>
> $logo
> </center>
> <hr color="#880000">
> <p>
> The following $myFont $codeQuery</font> parts are listed below.
> <hr>
>HTML
>
>my $names = $query->param();
>print "<center><table border=1>\n";
>print "<tr bgcolor=000066>";
>foreach my $name (@$names)
> {
> print "<th align=center><font color=\"cccccc\">$name</font></th>";
> }
>print "</tr>\n";
>my ($col, $gotdata);
>while (my @data = $sth->fetchrow_array)
> {
> print "<tr>";
> foreach $col (@data)
> {
> print "<td align=left>$col</td>";
> }
> print "</td>\n";
>
> }
>print "</table>\n";
>print "</body>\n";
>print "</html>";
>}
>
>$dbh->disconnect;
>&printMe
>#eof
------------------------------
Date: Wed, 04 Aug 1999 11:31:31 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Need Help Understanding a perl script
Message-Id: <7o98fj$44c$1@news.mch.sbs.de>
In article <rqegvaoar4fcq6@corp.supernews.com>, "Diane" <tech1@magicnet.net> wrote:
>
>> I would very much like to see that script. Can you post a copy ?
>>
>> Assuming it's well written, it shouldn't be too long :-)
>>
>>
>> Michel.
>
>Excellent! Here is the script. I understand the Print commands, and all the
>HTML outputs, what Id like some explanation on are the loops and variables
>and all the other lines that are not obvious...including how it sets up and
>loads the array of values..
>
>Thanks so much
[ugly code deleted]
Well, that's what I was afraid of :-)
Sorry I trapped you like that, but I couldn't resist making sure you're
teaching correct CGI Perl scripts to your students...
BTW, did you notice that your code will result in the following HTML code :
<HEAD>
<TITLE>...</TITLE>
</HEAD>
<BODY>
...
</BODY><HTML>
That doesn't seem to be really good, does it ?
Have a look at the code other people posted already to see how this could
be improved. And tell your students to use CGI.pm (or alternatives) !
An interesting newsgroup for more CGI questions is :
comp.infosystems.www.authoring.cgi
Have fun,
Michel.
------------------------------
Date: Wed, 04 Aug 1999 10:14:15 GMT
From: methabol@hem.passagen.se (Dan Zetterstrom)
Subject: Newsgroup suggestion! was: Re: Perl CGI vs VB ASP
Message-Id: <37ba0abf.116984474@news.algonet.se>
On 3 Aug 1999 21:49:19 -0500, abigail@delanet.com (Abigail) wrote:
>David Cassell (cassell@mail.cor.epa.gov) wrote on MMCLXIII September
>
>-- Now what was your Perl question? :-)
>
>
>No, no, no. The subject started with 'Re:'. So, he was posting an answer.
Now I got it! Maybe we should start comp.lang.perl.jeopardy instead of
the other groups that have been suggested. Then Tom C can move his FAQ
answers there and the newbies can reply with their questions, and it
will even _come_in_the_right_order_!
//DZ
--
Come the end, the only thing remaining
was the darkness in his soul.
Facing his fate with serenity
never to awake from the digital daydream.
------------------------------
Date: 4 Aug 1999 10:41:27 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Possible to get a HTML file from somewhere and use it as string?
Message-Id: <37a80ac7_2@newsread3.dircon.co.uk>
lpwong@my-deja.com wrote:
> ,
>
> Perl/CGI.
>
> Perl/CGI
>
>
What is this Perl/CGI? Where can I get it ?
/J\
--
"The Tory Party is like a wonky shopping trolley - it pulls to the
left, it pulls to the right, but you just can't get it to go forward"
- John Prescott
------------------------------
Date: Wed, 04 Aug 1999 12:08:54 +0200
From: Denis Pleic <dpleic@close.open.hr>
Subject: Problem: extracting terminology from text
Message-Id: <37A81136.557F3C2@close.open.hr>
Hi,
Again, I have a linguistic-related problem, and I need suggestions.
A while ago on a terminology mailing list, someone asked if there's
a tool which would enable you to extract "new" terminology from a
fairly large text. Here's an excerpt from the message:
>Does anyone have any suggestions on how to create terminology lists
>for use with MultiTerm from large amounts of untranslated text.
>(This is necessary if you wish to create and translate a terminology
>list before starting the main translation to ensure consistency when
>more than one translator is working on the same project).
>
>Other than doing it manually (i.e. wading through the source text
>and adding terms to the database), the only way I can think of doing
>it is to extract frequently occurring units using an except list to
>get rid of the useless words (such as 'and', 'the' and many more).
>But as it would seem impractical to create such an except list
>(unless anyone knows one which already exists), and as I'm not even
>sure if there is a tool to export FOUs using an except list
>(although I guess one could be developed), this solution does not
>seem realistic.
So, the basic idea is to have a "dictionary" of "standard"
words/terms, which would be used for "exceptions", i.e. for
comparison.
For example, when you get a new text, you'd compare it against this
standard "dictionary", and extract into a separate file all words
which do not appear in the dictionary. This list would, naturally,
be much shorter than the original text, and thus easier (and faster)
to "clean" by hand, leaving only new terms which need translating...
I know such a thing can be done with Perl, but I was wondering
about speed issue. For example, if the standard "dictionary" has
about 10,000 words, comparing a new text of about 20,000 words
against it would take quite some time, right?
So, if the text to filter has 20,000 words, and the dictionary has
10,000 words, that would mean 20,000 individual comparison
operations against a 10,000 word list... Quite time-consuming, right?
I'd also like to hear any ideas regarding how to set about doing
this (the original text should be split into lexical units - words,
for comparing them with the dictionary)...
So, any ideas would be welcome...
PS: I'm not really an expert with Perl, so forgive me if I've been
missing anything obvious...
Regards,
Denis
------------------------------
Date: Wed, 04 Aug 1999 11:08:29 +0200
From: "Lüder Sachse" <sachse@aeb.de>
Subject: revert gmtime()
Message-Id: <37A8030C.82DFE115@aeb.de>
Hi!
Is there an easy way (or a function) to calculate the seconds since
epoch out of a gmtime-formatted date string like 'Tue Aug 3 17:35:27
1999'?
Or do have to split the string and recalculate it by hand?
Thanks in advance.
Lueder
------------------------------
Date: Wed, 4 Aug 1999 06:36:00 -0400
From: "James A Culp III" <admin@futuristic.net>
Subject: Re: revert gmtime()
Message-Id: <7o95ff$fc1$1@ffx2nh3.news.uu.net>
Lüder Sachse <sachse@aeb.de> wrote in message
news:37A8030C.82DFE115@aeb.de...
> Hi!
>
> Is there an easy way (or a function) to calculate the seconds since
> epoch out of a gmtime-formatted date string like 'Tue Aug 3 17:35:27
> 1999'?
> Or do have to split the string and recalculate it by hand?
>
> Thanks in advance.
>
> Lueder
You might take a look at the Date::Calc module on CPAN. Very useful for
date manipulation.
Hope this helps,
James A Culp III
------------------------------
Date: Wed, 04 Aug 1999 10:08:39 GMT
From: sangin@cam.org (Jean-Pierre Sangin)
Subject: Special delete
Message-Id: <37a81076.548901@nntp.hip.cam.org>
Hello
Please could you tell me the command to delete in a directory all
files created one week ago or more.
Thank you
------------------------------
Date: Wed, 4 Aug 1999 07:55:52 -0400
From: "Diane" <tech1@magicnet.net>
Subject: thanks for nothing everybody
Message-Id: <rqgap5i4132ncq6@corp.supernews.com>
Gee thanks for your help NOT!!
All I wanted was a brief interpretation of some of the lines of code that
were NOT related to HTML, and all you people could come up with are
critiques of the code. I did not want or need that. Its NOT a cgi class,
just touches on it and I just wanted to explain some of the code, but
apparantly none of you are capable of doing that. I must say this is my
first time being treated so badly and getting such useless info from a
newsgroup. Most groups are most helpful and willing to share knowledge..
guess you folks are not. Sorry I wasted my time and hoped for some help
Michel Dalle <michel.dalle@usa.net> wrote in message
news:7o98fj$44c$1@news.mch.sbs.de...
> In article <rqegvaoar4fcq6@corp.supernews.com>, "Diane"
<tech1@magicnet.net> wrote:
> >
> >> I would very much like to see that script. Can you post a copy ?
> >>
> >> Assuming it's well written, it shouldn't be too long :-)
> >>
> >>
> >> Michel.
> >
> >Excellent! Here is the script. I understand the Print commands, and all
the
> >HTML outputs, what Id like some explanation on are the loops and
variables
> >and all the other lines that are not obvious...including how it sets up
and
> >loads the array of values..
> >
> >Thanks so much
>
> [ugly code deleted]
>
> Well, that's what I was afraid of :-)
> Sorry I trapped you like that, but I couldn't resist making sure you're
> teaching correct CGI Perl scripts to your students...
>
> BTW, did you notice that your code will result in the following HTML code
:
>
> <HEAD>
> <TITLE>...</TITLE>
> </HEAD>
> <BODY>
> ...
> </BODY><HTML>
>
> That doesn't seem to be really good, does it ?
> Have a look at the code other people posted already to see how this could
> be improved. And tell your students to use CGI.pm (or alternatives) !
>
> An interesting newsgroup for more CGI questions is :
> comp.infosystems.www.authoring.cgi
>
> Have fun,
>
> Michel.
------------------------------
Date: Wed, 4 Aug 1999 10:39:55 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
Subject: Re: Useless error when {} unbalanced
Message-Id: <sig11z3k3o.fsf@cre.canon.co.uk>
Filip M. Gieszczykiewicz <fmgst+@pitt.edu> wrote:
> But boy you miss a } and you're screwed:
If you use an auto-indenting or syntax-colouring editor then you get
quick visual feedback on missing braces, unpaired quotes and some other
syntax errors.
For example, Emacs with cperl-mode
http://www.cpan.org/authors/Ilya_Zakharevich/cperl-mode/
--
Gareth Rees
------------------------------
Date: Wed, 04 Aug 1999 05:33:45 -0400
From: HC <carvdawg@patriot.net>
Subject: Re: Working Telnet Script Needed
Message-Id: <37A808F9.42C1A6E8@patriot.net>
> No but you *did* whine:
Really? Is that what you think? Oh, wow...
Hold on, I'm getting an email response back from NASA...they've
confirmed my suspicions using the Hubble telescope and telemetry
taken during the last shuttle mission...the universe does NOT, in fact,
revolve around you, Jon...sorry.
Funny thing...after all this...the only comments posted in the groups
have been about the message formatting by my reader...nothing technically
oriented. Seems the snipes like to grab hold of _anything_ they can...
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 361
*************************************