[9203] in Perl-Users-Digest
Perl-Users Digest, Issue: 2798 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 5 23:08:01 1998
Date: Fri, 5 Jun 98 20:00:26 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 5 Jun 1998 Volume: 8 Number: 2798
Today's topics:
Re: comp.lang.perl.(n|q) another option? (Allan M. Due)
Displaying "my" vars in debugger <paulth@ix.netcom.com>
Re: Displaying "my" vars in debugger <tchrist@mox.perl.com>
forcing single line output (Todd C. Ames)
Re: forcing single line output (Bob Trieger)
Re: How do you identify the OS <halljs@a1.vsdec.nuwc.npt.navy.mil>
Re: I'm having problems: (Chris Reynolds)
Re: Negative values from Win32::GetTickCount? (Gurusamy Sarathy)
Re: newbie: trying to remove unwanted data from an arra <chad@zulu.net>
Re: Not even an RFD (yet)... comp.lang.perl.(newbie|que (John Stanley)
Re: Not even an RFD (yet)... comp.lang.perl.(newbie|que (Mark-Jason Dominus)
Re: Perl-Frage (Lupe Christoph)
Q: Disadvantages of fastcgi <captain@NOSPAM.pirate.de>
Re: Q: dispatch find/replace string (Tad McClellan)
Reading a PDF file with Perl mike_lottridge@mentorg.com
Re: Regular Expressions (Tad McClellan)
Re: Removing a character from a string (Tad McClellan)
Setting @INC as needed <morgan@hahaha.org>
Special caharater problem <Mivl@inquo.net>
Re: Special caharater problem <Mivl@inquo.net>
Re: Spider programms in PERL (Charles DeRykus)
Re: Spider programms in PERL (Bbirthisel)
striphtml program palincsars.isc@gao.gov
thumbnails <kelby@mplx.com>
Re: Uppercasing user input under CGI (Jonathan Stowe)
Re: Uppercasing user input under CGI (Tad McClellan)
Use of Diff and patch with perl on Linux <sirron@mail.mcoe.k12.ca.us>
Re: Why is there no "in" operator in Perl? (Ken Fox)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Jun 1998 23:40:02 GMT
From: due@murray.fordham.edu (Allan M. Due)
Subject: Re: comp.lang.perl.(n|q) another option?
Message-Id: <6l9vki$sj5$0@206.165.146.152>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <6l9oak$a1j$2@supernews.com>, Andy Lester
(petdance@maxx.mc.net) posted...
|Why do you think they'd read your site any more than they (don't) read the
|existing resources? Could you possibly have a better site than
|www.perl.com?
|
The offered site would in no way be "better" than www.perl.com. In fact I
do not possess that much hubris. On the other hand, suggesting that an
individual that has made an inappropriate post to c.l.p.m go peruse
www.perl.com is unlikely to reduce the probability that said individual
will not create similar inappropriate posts in the future.
My offer is merely to create a single reference site that would
contain all of the useful materials that pertain to correct protocol when
posting to c.l.p.m, plus some materials to help the complete neophyte make
sense of the suggestions given to them after they have transgressed the
mores of the group. Sort of a newbie start here site, regardless of their
transgression; whether it be material covered in a FAQ or a CGI question,
or some other similar error in judgement. A one stop reference for the
clueless. To help clue them in.
The idea is not that such a site is more likely to be visited. You
can lead a horse to water but you can't make him drink. Rather the idea
is to reduce the bandwidth needed to set a person on the path to
righteousness. Just say. You have erred in your ways. Proceed to
www.help to see the light.
Just trying to help.
--
Allan M. Due
Due@Murray.Fordham.edu
The beginning of wisdom is the definitions of terms.
- Socrates
------------------------------
Date: Fri, 05 Jun 1998 17:36:58 -0700
From: Paul Thilking <paulth@ix.netcom.com>
Subject: Displaying "my" vars in debugger
Message-Id: <35788F2A.5F3072C2@ix.netcom.com>
In this simple program, if you place a breakpoint at the first print
statement, and then
type "X local_var", you see the value of local_var.
If you type "X my_var", you see nada. What am I doing wrong?
Thanks,
Paul
#!/usr/local/bin/perl
print_stuff();
sub print_stuff
{
local($local_var);
my($my_var);
$local_var = "local var\n";
$my_var = "my var\n";
print $local_var;
print $my_var;
}
------------------------------
Date: 6 Jun 1998 01:41:50 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Displaying "my" vars in debugger
Message-Id: <6la6ou$im5$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
thilking@acm.org writes:
:In this simple program, if you place a breakpoint at the first print
:statement, and then
:type "X local_var", you see the value of local_var.
:
:If you type "X my_var", you see nada. What am I doing wrong?
You should say:
DB> x $somevar
or
DB> x \@somevar
--tom
--
ENOSIG: This signature file is empty.
------------------------------
Date: Sat, 06 Jun 1998 00:35:30 GMT
From: ames0009@tc.umn.edu (Todd C. Ames)
Subject: forcing single line output
Message-Id: <35788d4c.11330647@news.tc.umn.edu>
Is there a way to force print output (writing to a file) on a single
line? I have a tab delimited list that is very long for each entry,
and each entry in the file must be on one line. Everything I've read
about using print formats and value fields has described how to split
a long string, not how to force it to stay together.
Thanks,
T. Ames
>>>>>>>>>>>>>>>>>>>
Todd C. Ames
ames0009@tc.umn.edu
University of Minnesota
------------------------------
Date: Sat, 06 Jun 1998 02:40:40 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: forcing single line output
Message-Id: <6laaa5$15n$1@strato.ultra.net>
[ posted and mailed ]
ames0009@tc.umn.edu (Todd C. Ames) wrote:
-> Is there a way to force print output (writing to a file) on a single
-> line? I have a tab delimited list that is very long for each entry,
-> and each entry in the file must be on one line. Everything I've read
-> about using print formats and value fields has described how to split
-> a long string, not how to force it to stay together.
huh?
output doesn't insert new line or carriage return unless you tell it to.
Post a sample of the problem you are having.
Bob Trieger
sowmaster@juicepigs.com
" Cost a spammer some cash: Call 1-800-239-0341
and hang up when the recording starts. "
------------------------------
Date: Fri, 05 Jun 1998 13:46:32 -0400
From: Jeff Hall <halljs@a1.vsdec.nuwc.npt.navy.mil>
To: Phil Taylor <phil@ackltd.demon.co.uk>
Subject: Re: How do you identify the OS
Message-Id: <35782EF7.669BB151@a1.vsdec.nuwc.npt.navy.mil>
Dear Phil,
You made 1 little booboo. The definition of functions in Perl begins
with the
keyword "sub", not "proc". Make that one change and your code will run
fine. This
incorrect keyword explains why the code runs fine when not part of a
function.
Phil Taylor wrote:
> Is there a method that exists that can be called from Perl which can
> detect which OS is running?
>
> There is a chunk of code at the start of CGI.pm which does this and I
> have copied it into a procedure (see below), but Perl doesn't seem to
> like the code inside a procedure declaration. It works fine in the
> main body of the program.
>
> Any thoughts ?
>
> # -----
> proc os
> # -----
> {
> unless ($OS) {
> unless ($OS = $^O) {
> require Config;
> $OS = $Config::Config{'osname'};
> }
> }
> if ($OS=~/Win/i) {
> $OS = 'WINDOWS';
> } elsif ($OS=~/vms/i) {
> $OS = 'VMS';
> } elsif ($OS=~/^MacOS$/i) {
> $OS = 'MACINTOSH';
> } elsif ($OS=~/os2/i) {
> $OS = 'OS2';
> } else {
> $OS = 'UNIX';
> }
> return $OS;
> }
------------------------------
Date: Fri, 05 Jun 1998 11:30:09 GMT
From: cmreynolds@hotmail.com (Chris Reynolds)
Subject: Re: I'm having problems:
Message-Id: <3577d6a8.20551798@news.sprint.ca>
>
>That all sounds easy enough. Do you have a specific problem or do
>you just want one of us to write your program for you?
>
>-- Jim Bowlin
more or less, I have no idea how to get it all done! Can anyone
help??
------------------------------
Date: 5 Jun 1998 23:21:38 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: Negative values from Win32::GetTickCount?
Message-Id: <6l9ui2$mv0@srvr1.engin.umich.edu>
[ mailed and posted ]
In article <6l9lng$gm3@fohnix.metronet.com>,
Tye McQueen <tye@fohnix.metronet.com> wrote:
>Perhaps sv_setiv() and related macros should deal with this more
>intelligently? Or do we need something like sv_setuiv()?
>
>#define sv_setuiv(sv,val) \
> (IV)val < 0 ? sv_setnv(sv,(double)val) : sv_setiv(sv,(IV)val)
This is such a good idea that it already exists. :-)
sv.c
1176 void
1177 sv_setuv(register SV *sv, UV u)
1178 {
1179 if (u <= IV_MAX)
1180 sv_setiv(sv, u);
1181 else
1182 sv_setnv(sv, (double)u);
1183 }
It would be a good idea to add XSRETURN_UV() et al to XSUB.h.
- Sarathy.
gsar@umich.edu
------------------------------
Date: Fri, 05 Jun 1998 00:00:03 +0000
From: Chad Thatcher <chad@zulu.net>
Subject: Re: newbie: trying to remove unwanted data from an array....
Message-Id: <35773503.65C0434B@zulu.net>
Steve Neuharth wrote:
>
> O.k. I KNOW there's an easy answer to this.... I can't seem to find it
> anywhere....
> I've got an array (@rawoutput). I only need the lines that contain
> "SUB-TOTAL:".... I'm trying some thing like this.....
> $x=0;
> for ($y=0;$y <= @rawoutput; $y++){
> if (@rawoutput[$y] =~ /SUB-TOTAL:/) {
> @output[$x] = @rawoutput[$y];
> $x++;
> }
> }
> @output never seems to populate with data (not sure why).
>
> I was thinking there should be a way to do it something like this (?).......
> @output = (@rawoutput =~ /SUB-TOTAL:/);
Heres one solution:
while (@array) {
if (/^SUB-TOTAL:(.*)/i) {
push(@output);
}
}
Viola! First off, the while dumps the current @array item in the
infamous $_ and thats why the if doesn't reference any variable. This
is much much faster than other techniques. Also notice the ^ (caret)
symbol at the beginning. This is ONLY IF the 'SUB_TOTAL:' is sure to
appear at the very beginning of the line. Use this if this is the case
and the regex runs a lot faster. if not (ie SUB-TOTAL: can appear
somewhere in the middle of the line) use something like:
if (/.*SUB-TOTAL:.*/) ...
What is important is the .* where the . means any character and the *
means any number of occurances including no occurances at all. Using
brackets will 'remember' the value in the $1 $2 etc vars but this is
another issue...
Using ^ and $ will speed up the expression but this is yet another...
Hope this was helpfull,
Chad
------------------------------
Date: 6 Jun 1998 00:44:05 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Not even an RFD (yet)... comp.lang.perl.(newbie|questions)
Message-Id: <6la3cl$rsm$1@news.NERO.NET>
In article <6l9beo$q6n$1@monet.op.net>, Mark-Jason Dominus <mjd@op.net> wrote:
>In article <86soljsrlr.fsf@scooter.cis.ohio-state.edu>,
>Matt Curtin <cmcurtin@interhack.net> wrote:
>>I have seen some noise about a comp.lang.perl.moderated, but I haven't
>>seen it reach any Official Stages toward becoming a real newsgroup.
>
>There have been two charters posted with requests for discussion, most
>recently on 26 May.
The most recent RFD I have is dated 22 May. It's unlikely that I simply
missed seeing the second RFD dated 26 May, since I have an automated
archive of news.announce.newgroups, and it is not there.
>The call for votes will go out in seven days.
You know, when I said "call the vote", I had halfway hoped that the active
proponent would say "no, we still have an issue on the table." I was
also halfway expecting the proponent to abandon the discussion, but I am
still dissappointed to see it happen. Please make sure the charter in
the CFV is honest about the practicality of posting using munged
addresses. Requiring people to change their newsreader configuration and
enter a special header in every article they post makes it infeasible
for the user, but then, the promise wasn't that the method would be
feasible for the user, just "feasible".
> Subject: RFD: comp.lang.perl.moderated moderated
That should be "2nd RFD:". The second one should be marked to make it
clear that it is a different one than the first.
>It was posted here, in comp.lang.perl.announce, and in news.groups.
That must be why I am missing the second RFD that was posted on 26 May.
It should have been posted to news.announce.newgroups.
>> Would clp.moderated be redundant with clp(n|q)?
>
>No, but comp.lang.perl.misc would be.
No, it would not. If newbie is created, by definition, it will not be
redundant with .misc.
------------------------------
Date: 5 Jun 1998 21:12:36 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Not even an RFD (yet)... comp.lang.perl.(newbie|questions)
Message-Id: <6la524$7ch$1@monet.op.net>
In article <6la3cl$rsm$1@news.NERO.NET>,
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
>The most recent RFD I have is dated 22 May.
Thanks for your correction. I meant to say 22 May.
------------------------------
Date: 1 Jun 1998 00:28:20 +0200
From: lupe@alanya.m.isar.de (Lupe Christoph)
Subject: Re: Perl-Frage
Message-Id: <6ksli4$1ej$1@alanya.m.isar.de>
Gellyfish@btinternet.com (Jonathan Stowe) writes:
>On 30 May 1998 13:47:38 GMT, wolfram.oehms wrote :
>That will be ( courtesy of: http://babelfish.altavista.digital.com ):
>>Der Nutzer mu_ aber keine Verpflichtung eingehen, d.h. wenn er "vergi_t"
>>den Betrag zu |berweisen, wird dies keinerlei Konsequenzen haben.
>... The
>user must die however no obligation, i.e. if he " does not forget "
>the amount to transfer, this any consequences will have. ...
>I didnt like the bit where it says " the user must die" - but hey this
>guy probably works for Microsoft (or IG Farben)..
Shoot that Babelfish ;-)
The sentence should translate to:
The user does not have to take any obligations, i.e. if he
"forgets" to transfer the amount, there will be no
consequences.
The Babelfish translated "eingehen" as in "ein Tier geht ein",
"an animal dies off" rather than "eine Verpflichtung eingehen",
"to incur an obligation". Plus it left out the negation in
the second part.
I have yet to see an automatic translation that does not yield gibberish.
--
| lupe@alanya.m.isar.de (private) | lupe@octogon.de (business) |
| "In short, just as the Multics mentality of careful access controls |
| shows up throughout Unix, the cretinous CP/M mentality of uncontrolled |
| havoc shows up in DOS and all its mutant children." Tom Christiansen |
------------------------------
Date: Sat, 06 Jun 1998 02:48:28 +0200
From: Mark Seuffert <captain@NOSPAM.pirate.de>
Subject: Q: Disadvantages of fastcgi
Message-Id: <357891DC.9F0@NOSPAM.pirate.de>
Hi,
I have read the documentation/mailarchive about fastcgi....
I'm not sure what to think about it, is it true that:
1. fastcgi does not support nph scripts?
2. a CGI script with fastcgi could not be called multiple from
different surfers (or what does it mean, no multithreading is
supported)? Do I have to wait untill the request is answered,
before the next user could be served?
3. there is no further development of fastcgi?
Thx for help! :)
Some weeks before there has been a discussion about "fastcgi vs.
mod_perl"... which are the main disadvantages of "mod_perl" and
"fastcgi"? I'm still confused which is the best solution... means which
provides fast CGIs and is still supported in the future?
--
/Moak (Please delete "nospam" in emailadress)
------------------------------
Date: Fri, 5 Jun 1998 19:19:20 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Q: dispatch find/replace string
Message-Id: <8u1al6.hj3.ln@localhost>
F.Quednau (quednauf@nortel.co.uk) wrote:
: Xah Lee wrote:
: > What's an efficient way of doing find and replace with a large "find/replace" lookup table?
: >
: > An example:
: >
: > my $str = '1992 feb 1 kim';
: > my %largeFindandRelpaceTable = ('jan'=>1,'feb'=>2,...);
: > my $desiredResult = '1992 2 1 kim';
: s/(jan)|(feb)|(mar)|.../%reptabl{$1}/
: Could be wrong (I don't have any reference around right now...)
s/Could/Is/; # ;-)
if 'feb' matches, then the value will be stored in $2, not in $1...
... and putting parens around each alternative is kinda strange
(as well as causing the above breakage).
/(jan|feb|mar)/$reptabl{$1}/; # easier to read, and has the added
# advantage of actually working ;-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 05 Jun 1998 22:08:58 GMT
From: mike_lottridge@mentorg.com
Subject: Reading a PDF file with Perl
Message-Id: <6l9q9q$utc$1@nnrp1.dejanews.com>
I'm looking for a perl script that will convert PDF to text, for simple
searching. Alternatively, a command line utility for Win95 that would convert
a PDF to a text file could be a workaround, that the perl script could call
as needed.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Fri, 5 Jun 1998 19:04:13 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Regular Expressions
Message-Id: <t11al6.hj3.ln@localhost>
Scott Erickson (Scott.L.Erickson@HealthPartners.com) wrote:
: In article <6l6mkb$1q48$1@news.gate.net>, dsiebert@gate.net says...
: > I need to extract the text form between two tags
: > <hw> and </hw>
: /<hw>(.*?)<\/hw>/igsm # non greedy matching, case-insensitive, global
^
^ this modifier has *no* effect here.
^ it will work identically if it is left off...
: matching, ignore specialness of newlines
m//m only affects how the regex engine handles anchors ( ^ and $ ).
There are no anchors in that regex, and so, m//m has no effect.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 5 Jun 1998 19:26:53 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Removing a character from a string
Message-Id: <dc2al6.hj3.ln@localhost>
Martine Habib (mhabib@microsoft.com) wrote:
: If I have a string $string = "this&that";
: I want to remove the ampersand, and end up with $string = "thisthat";
: How can I do this in perl ?
$string = tr/&//d; # remove *all* ampersand characters from $string
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 05 Jun 1998 16:20:34 -0700
From: Morgan Fletcher <morgan@hahaha.org>
Subject: Setting @INC as needed
Message-Id: <rlq3edjzb99.fsf@shell3.ba.best.com>
I have a perl script that uses various homegrown modules. The script
and its attendant modules will live in source control, and might get
populated to various machines in different directories. I want the
script to be able to find its modules no matter where it's executed
from.
The @INC path array automatically includes ".", but this script will be
executed regardless of CWD.
Is it a valid strategy to try to deduce the location of the script and then
set @INC accordingly?
morgan
--
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
>> M o r g a n F l e t c h e r http://www.hahaha.org <<
>> Tibi gratias agimus quod nihil fumas. morgan@hahaha.org <<
------------------------------
Date: Fri, 5 Jun 1998 16:09:07 -0600
From: "Kris Davey" <Mivl@inquo.net>
Subject: Special caharater problem
Message-Id: <6l9qat$gl$2@quartz.inquo.net>
I was wondering how to turn off the special character \. Here's the problem
I am writing a script to map a drive to each ofour boxes run a command, read
the output and write it into a formated report, I have gotten everything
done and working with the exception of mapping a drive. Here is what i have
tried so far
system("net use y: \\$i\is");
`net use y: \\$i\is`;
It seems as though it is doing something with the \ character. I also
thought that there must be a module that would do something and I think the
win32::NetResource::GetResource would do it but I have gotten confused
trying to read the instructions for the command, when it got into the hash
portion.
If any body could show me a way to turn off the \ or an annotated
description of the win32 module I would appreciate it. Thanks.
Kris Davey
mivl@inquo.net
------------------------------
Date: Fri, 5 Jun 1998 19:39:09 -0600
From: "Kris Davey" <Mivl@inquo.net>
Subject: Re: Special caharater problem
Message-Id: <6la6jj$6hr$1@quartz.inquo.net>
Sorry I found my answer below, I must have missed when I checked before
posting the previous message.
------------------------------
Date: Fri, 5 Jun 1998 23:59:28 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Spider programms in PERL
Message-Id: <Eu3rz4.3I3@news.boeing.com>
In article <6l931c$49n$1@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, Ala Qumsieh <aqumsieh@matrox.com> writes:
>: Boy .. that is the longest sentence I've ever read!
>
>
> chthonic monstrosities long since banished to the nethermost
> ^^^^^^^
chthonic: of or relating to the underworld
For those who can never remember obscure Greek words...
--
Charles DeRykus
------------------------------
Date: 06 Jun 1998 01:25:58 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Spider programms in PERL
Message-Id: <1998060601255800.VAA10571@ladder03.news.aol.com>
Hi Steve and Tom:
>Not quite as long as Tom's gem above, but still quite good.
The impressive thing about Tom's is the astronomical ratio
of words/punctuation. Plus, it's informative and readable.
-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)
------------------------------
Date: Fri, 05 Jun 98 11:36:32 EST
From: palincsars.isc@gao.gov
Subject: striphtml program
Message-Id: <9805058970.AA897072143@mailgateway2.gao.gov>
On 5 Jun 1998 14:29:22 GMT Tom Christiansen <tchrist@mox.perl.com>
said:
>In comp.lang.perl.misc,
> dsiebert@gate.net (David Siebert) writes:
>:I have the hardest time with these.
>:I need to extract the text form between two tags
>:<hw> and </hw>
>:help please.
>
>A regular expression is wrong in the general case. You can't do a fully
>recursive parse with a regular expression. Use a module. Lift your eyes
>to perlfaq9, wherein resides your answer. Is there some reason why you
>declined to read the entries in that FAQ regarding "How do I remove HTML
>from a string?" and "How do I extract URLs?"
Perlfaq9 mentions Tom's striphtml.gz program, and the html version of
perlfaq9 provides a download link to it in CPAN.
I've been using this program successfully on a Solaris box with perl
5.003, but when I attempt to run it with either the Laszlo Molnar
djgpp port of perl 5.004 for Win16 or the GSAR port for Win32, I
get the following error:
< # opening angle bracket
(?: # Non-backreffing grouping paren
[^>'"] * # /: regexp *+ operand could be empty at line 6
Does anybody have any idea what has changed between 5.002 (called for
in the program) and perl 5.004 to cause this error?
Steve Palincsar
palincsars.isc@gao.gov
------------------------------
Date: Fri, 5 Jun 1998 16:14:36 -0400
From: "Kelby Valenti" <kelby@mplx.com>
Subject: thumbnails
Message-Id: <6l9jij$d3si$1@newssvr04-int.news.prodigy.com>
I'm looking for a program that will create thumbnails from a directory of
images. I would like this to be a cgi program. If you can help me in my
search I'd appreciate it.
Thank you,
Kelby
------------------------------
Date: Fri, 05 Jun 1998 22:06:35 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Uppercasing user input under CGI
Message-Id: <3578675a.3510201@news.btinternet.com>
On Fri, 05 Jun 1998 17:10:00 -0400, Jeffrey P. Katz wrote :
>Content-Type: text/html; charset=us-ascii
Nope that didnt work.
><HTML>
>Hello.
>
><P>I'm a new Perl person, and have written a module that performs a string
><BR>search on an external file. I have 2 questions:
>
><P>Question 1: Perl5 CGI gives this error message on compilation,
>and
><BR>won't return to Unix without a <CRL>C:
>
><P>(offline mode: enter name=value pairs on standard input)
>
><P>What does this mean? And what should I do about it?
>
It means what its says bucko. Better read the documentation on
CGI.pm. A quick summary goes
fish=chips
^[ZD]
blah
><P>Question 2: I'd like to take the variable
>
><P>$query->textfield('textword')
>
Bored already. The Iceland vs Monsanto debate on the TV is more
interesting.
/J\
Despite having had the sutures out I still cant touch my palm.
Jonathan Stowe
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Fri, 5 Jun 1998 19:30:23 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Uppercasing user input under CGI
Message-Id: <vi2al6.hj3.ln@localhost>
Scratchie (upsetter@ziplink.net) wrote:
: Jeffrey P. Katz <jefkatz@rci.rutgers.edu> wrote:
: : <P>(offline mode: enter name=value pairs on standard input)
: PS: You really shouldn't post HTML to newsgroups. It's hard to read.
And it gets you killfiled sometimes too, which is likely to have an
effect on the quality and quantity of answers that you can expect
for future postings...
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 05 Jun 1998 16:33:09 -0700
From: Joseph Norris <sirron@mail.mcoe.k12.ca.us>
Subject: Use of Diff and patch with perl on Linux
Message-Id: <35788035.E4B67135@mail.mcoe.k12.ca.us>
Hello listeros,
Has anyone used Linux patch and diff command to maintain coding cycles
for perl?
thanks.
--
Joseph Norris (Perl/Linux/Linux)
@n=(106,117,115,116,32,97,110,111,116,104,101,114,32,112,101,114,108,32,
104,97,99,107,101,114,32,106,111,115,101,112,104,32,78,111,114,114,105,115,10);
print @c=map chr,@n;
------------------------------
Date: 5 Jun 1998 21:56:26 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: Why is there no "in" operator in Perl?
Message-Id: <6l9pia$76r5@eccws1.dearborn.ford.com>
fl_aggie@thepentagon.com (I R A Aggie) writes:
> kfox@pt0204.pto.ford.com wrote:
>
> + Probably. There is the time/space trade-off to consider. Also,
> + an array has properties that the hash doesn't -- it's ordered for
> + one.
>
> Really? I don't see it, so educate me.
Both of my points are obvious. Arrays are ordered, hashes aren't.
Hashes consume more space than arrays.
If you *mostly* need an array, don't worry about using an "in" operator
to test the array. Trying to use a hash in place of an array just
because somebody tells you only to use "in" with a hash is a mistake.
Of course, Tom's advice is going to be right most of the time which
is why I said "Probably."
> AFAIK, there is no way to know that @list will be ordered unless you
> know for sure that the input itself is ordered.
Arrays are by definition ordered. I think you are confusing "ordered"
with "sorted."
For example, say you need to keep track of contest winners. An array
might be useful because it is ordered, e.g. $winner[0] beat $winner[1].
If you *occasionally* need to check if somebody is a winner, it's fine
to use "in" on the array.
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 2798
**************************************