[12607] in Perl-Users-Digest
Perl-Users Digest, Issue: 8 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 2 20:57:46 1999
Date: Fri, 2 Jul 1999 17:48:02 -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 Fri, 2 Jul 1999 Volume: 9 Number: 8
Today's topics:
eval problem -- scoping bug? (Malcolm Hoar)
Re: FAQ 4.11: How do I find the current century or mill <swiftkid@bigfoot.com>
Re: FAQ 4.28: How do I capitalize all the words on one <dodger@dodger.org>
Re: FAQ 4.28: How do I capitalize all the words on one (Matthew Bafford)
Re: FAQ 4.28: How do I capitalize all the words on one <uri@sysarch.com>
Re: FAQ 4.28: How do I capitalize all the words on one (Hansan Diwan)
Re: FAQ 4.28: How do I capitalize all the words on one (M.J.T. Guy)
Re: FAQ 4.28: How do I capitalize all the words on one (Abigail)
Re: FAQ 4.33: How do I find the soundex value of a stri <cassell@mail.cor.epa.gov>
File Not Found rt_daemon@my-deja.com
Re: File Not Found (I R A Aggie)
Re: File Not Found <gellyfish@gellyfish.com>
Re: File Not Found (Bob Trieger)
Re: Filename from <STDIN> (Tad McClellan)
Re: Foreach on hash gives undefined value <gellyfish@gellyfish.com>
Re: Forms Processing - thread started in HTML group (Abigail)
Re: Forms Processing - thread started in HTML group (Ken)
Re: Forms Processing - thread started in HTML group (Ken)
Re: Forms Processing - thread started in HTML group <emschwar@rmi.net>
Re: Forms Processing - thread started in HTML group (Ken)
Re: Forms Processing - thread started in HTML group <emschwar@rmi.net>
Re: Forms Processing - thread started in HTML group (Abigail)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 02 Jul 1999 18:24:10 GMT
From: malch@malch.com (Malcolm Hoar)
Subject: eval problem -- scoping bug?
Message-Id: <7lj04a$1ji81r8_002@nntp1.best.com>
A much larger program contains the following code:
sub special {
my ($string) = @_;
print "TEST1 $string\n";
eval ('print "TEST2 $string\n";');
return;
}
The first print displays the correct result. The second print
(within the eval) displays a different (incorrect) result.
Sadly, I cannot reproduce the problem by calling &special
from a noddy 5 line script.
Am I missing something silly WRT scoping rules or is this
related to problems with the Redhat binary distributions
that I've seen mentioned elsewhere?
$ perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
Platform:
osname=linux, osvers=2.0.34, archname=i386-linux
uname='linux porky.redhat.com 2.0.34 #1 thu may 7 10:17:44 edt 1998 i686
unknown '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=y useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.7.2.3
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=undef, doublesize=undef
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, so=so
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Locally applied patches:
MAINT_TRIAL_4 - 5.004_05 maintenance trial 4
Built under linux
Compiled at Sep 10 1998 02:16:22
@INC:
/usr/lib/perl5/i386-linux/5.00404
/usr/lib/perl5
/usr/lib/perl5/site_perl/i386-linux
/usr/lib/perl5/site_perl
.
--
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar "The more I practice, the luckier I get". |
| malch@malch.com Gary Player. |
| http://www.malch.com/ Shpx gur PQN. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Fri, 2 Jul 1999 17:27:29 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: FAQ 4.11: How do I find the current century or millennium? - Tom
Message-Id: <7ljeid$7ek9@news.cyber.net.pk>
> sub get_century
> {
> return int((((localtime(shift || time))[5] + 1999))/100);
> }
> sub get_millennium
> {
> return 1+int((((localtime(shift || time))[5] + 1899))/1000);
> }
Why do you have an extra pair of parenthesis there (in both)?
sub get_century {
int ( ( ( localtime ( shift || time ) ) [ 5 ] + 1999 ) / 100 ); #cute?
}
?
(I couldn't post this earlier, so it will not be in its original thread!)
------------------------------
Date: Thu, 1 Jul 1999 04:10:37 -0700
From: "Dodger" <dodger@dodger.org>
Subject: Re: FAQ 4.28: How do I capitalize all the words on one line?
Message-Id: <7li4ss$410$1@ancalagon.dragon-net.net>
Why not just do this:
@temp = split $string;
for (@temp) { ucfirst }
$string = join ' ',@temp;
it seems simpler and avoids complex regexes...
Dodger
Sorry if I sound silly. I'm new here.
--
I don't care if it rains or freezes
Long as I've got my Strap-on Jesus...
The Necrosoft Network is now online!
Add your site and help make it the net's premiere Gothic Search Engine!
http://www.gothic-classifieds.com/necrosoft/
Tom Christiansen wrote in message <377c5a8c@cs.colorado.edu>...
>(This excerpt from perlfaq4 - Data Manipulation
> ($Revision: 1.49 $, $Date: 1999/05/23 20:37:49 $)
>part of the standard set of documentation included with every
>valid Perl distribution, like the one on your system.
>See also http://language.perl.com/newdocs/pod/perlfaq4.html
>if your negligent system adminstrator has been remiss in his duties.)
>
> How do I capitalize all the words on one line?
>
> To make the first letter of each word upper case:
>
> $line =~ s/\b(\w)/\U$1/g;
>
> This has the strange effect of turning "`don't do it'" into "`Don'T
> Do It'". Sometimes you might want this, instead (Suggested by Brian
> Foy):
>
> $string =~ s/ (
> (^\w) #at the beginning of the line
> | # or
> (\s\w) #preceded by whitespace
> )
> /\U$1/xg;
> $string =~ /([\w']+)/\u\L$1/g;
>
> To make the whole line upper case:
>
> $line = uc($line);
>
> To force each word to be lower case, with the first letter upper
> case:
>
> $line =~ s/(\w+)/\u\L$1/g;
>
> You can (and probably should) enable locale awareness of those
> characters by placing a `use locale' pragma in your program. See
> the perllocale manpage for endless details on locales.
>
> This is sometimes referred to as putting something into "title
> case", but that's not quite accurate. Consider the proper
> capitalization of the movie *Dr. Strangelove or: How I Learned to
> Stop Worrying and Love the Bomb*, for example.
>
>--
> last|perl -pe '$_ x=/(..:..)...(.*)/&&"'$1'"ge$1&&"'$1'"lt$2'
> That's gonna be tough for Randal to beat... :-)
> --Larry Wall in
<1991Apr29.072206.5621@jpl-devvax.jpl.nasa.gov>
------------------------------
Date: Fri, 02 Jul 1999 12:08:18 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: FAQ 4.28: How do I capitalize all the words on one line?
Message-Id: <slrn7npa4p.3b1.*@dragons.duesouth.net>
[Please go to news.newusers.* and review quoting rules]
On Thu, 1 Jul 1999 04:10:37 -0700, Dodger" <dodger@dodger.org> poured
coffee onto a keyboard, producing the following in comp.lang.perl.misc:
: Why not just do this:
: @temp = split $string;
: for (@temp) { ucfirst }
: $string = join ' ',@temp;
Well, that will almost work. Also, it has @temp, which is ugly.
Try:
$string = join " ", map { ucfirst lc } split " ", $string;
: it seems simpler and avoids complex regexes...
Simpler, perhaps, if you don't know Perl. The above isn't exactly
obvious, though.
Compare to:
$string =~ s/(\S+)/\u\L$1/g;
: Dodger
HTH,
--Matthew
------------------------------
Date: 02 Jul 1999 10:07:05 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: FAQ 4.28: How do I capitalize all the words on one line?
Message-Id: <x7yagz16ye.fsf@home.sysarch.com>
>>>>> "MB" == Matthew Bafford <@dragons.duesouth.net> writes:
MB> [Please go to news.newusers.* and review quoting rules]
MB> On Thu, 1 Jul 1999 04:10:37 -0700, Dodger" <dodger@dodger.org> poured
MB> coffee onto a keyboard, producing the following in comp.lang.perl.misc:
MB> : Why not just do this:
MB> : @temp = split $string;
MB> : for (@temp) { ucfirst }
MB> : $string = join ' ',@temp;
MB> Well, that will almost work. Also, it has @temp, which is ugly.
MB> Try:
MB> $string = join " ", map { ucfirst lc } split " ", $string;
and both answers ruin any white space formatting. this should fix that
(though i would use the regex in any case)
$string = join '', map { ucfirst lc } split /(\s+)/, $string;
and of course any dumb solution like this would ruin many proper names
and cause other capitalization bugs.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 2 Jul 1999 19:25:05 -0400
From: jackal@acm.rpi.edu (Hansan Diwan)
Subject: Re: FAQ 4.28: How do I capitalize all the words on one line?
Message-Id: <7ljhoh$4ps$1@delenn.acm.rpi.edu>
"Dodger" <dodger@dodger.org> writes:
>Why not just do this:
>@temp = split $string;
>for (@temp) { ucfirst }
map (ucfirst, @temp); # Another possibility
>$string = join ' ',@temp;
>it seems simpler and avoids complex regexes...
>Dodger
>Sorry if I sound silly. I'm new here.
>--
>I don't care if it rains or freezes
>Long as I've got my Strap-on Jesus...
>The Necrosoft Network is now online!
>Add your site and help make it the net's premiere Gothic Search Engine!
>http://www.gothic-classifieds.com/necrosoft/
>Tom Christiansen wrote in message <377c5a8c@cs.colorado.edu>...
>>(This excerpt from perlfaq4 - Data Manipulation
>> ($Revision: 1.49 $, $Date: 1999/05/23 20:37:49 $)
>>part of the standard set of documentation included with every
>>valid Perl distribution, like the one on your system.
>>See also http://language.perl.com/newdocs/pod/perlfaq4.html
>>if your negligent system adminstrator has been remiss in his duties.)
>>
>> How do I capitalize all the words on one line?
>>
>> To make the first letter of each word upper case:
>>
>> $line =~ s/\b(\w)/\U$1/g;
>>
>> This has the strange effect of turning "`don't do it'" into "`Don'T
>> Do It'". Sometimes you might want this, instead (Suggested by Brian
>> Foy):
>>
>> $string =~ s/ (
>> (^\w) #at the beginning of the line
>> | # or
>> (\s\w) #preceded by whitespace
>> )
>> /\U$1/xg;
>> $string =~ /([\w']+)/\u\L$1/g;
>>
>> To make the whole line upper case:
>>
>> $line = uc($line);
>>
>> To force each word to be lower case, with the first letter upper
>> case:
>>
>> $line =~ s/(\w+)/\u\L$1/g;
>>
>> You can (and probably should) enable locale awareness of those
>> characters by placing a `use locale' pragma in your program. See
>> the perllocale manpage for endless details on locales.
>>
>> This is sometimes referred to as putting something into "title
>> case", but that's not quite accurate. Consider the proper
>> capitalization of the movie *Dr. Strangelove or: How I Learned to
>> Stop Worrying and Love the Bomb*, for example.
>>
>>--
>> last|perl -pe '$_ x=/(..:..)...(.*)/&&"'$1'"ge$1&&"'$1'"lt$2'
>> That's gonna be tough for Randal to beat... :-)
>> --Larry Wall in
><1991Apr29.072206.5621@jpl-devvax.jpl.nasa.gov>
------------------------------
Date: 3 Jul 1999 00:10:54 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: FAQ 4.28: How do I capitalize all the words on one line?
Message-Id: <7ljkee$edi$1@pegasus.csx.cam.ac.uk>
Hansan Diwan <jackal@acm.rpi.edu> wrote:
>"Dodger" <dodger@dodger.org> writes:
>
>>Why not just do this:
>>@temp = split $string;
>>for (@temp) { ucfirst }
>
>map (ucfirst, @temp); # Another possibility
And what exactly is that meant to do? There are cheaper no-ops
available in Perl.
Mike Guy
------------------------------
Date: 2 Jul 1999 19:37:39 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: FAQ 4.28: How do I capitalize all the words on one line?
Message-Id: <slrn7nqmq2.31h.abigail@alexandra.delanet.com>
Dodger (dodger@dodger.org) wrote on MMCXXX September MCMXCIII in
<URL:news:7li4ss$410$1@ancalagon.dragon-net.net>:
,, Why not just do this:
,, @temp = split $string;
,, for (@temp) { ucfirst }
,, $string = join ' ',@temp;
,,
,, it seems simpler and avoids complex regexes...
First of all you have the syntax of split wrong. Secondly, it'll
utterly fail if words are separated by anything else than a single
space. Simplicity is no excuse for wrong code.
Abigail
--
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} # Yet Another silly JAPH by Abigail
sub A::FETCH {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Fri, 02 Jul 1999 14:01:55 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FAQ 4.33: How do I find the soundex value of a string?
Message-Id: <377D28C3.8701CA96@mail.cor.epa.gov>
Tom Christiansen wrote:
>
> (This excerpt from perlfaq4 - Data Manipulation
> ($Revision: 1.49 $, $Date: 1999/05/23 20:37:49 $)
> part of the standard set of documentation included with every
> valid Perl distribution, like the one on your system.
> See also http://language.perl.com/newdocs/pod/perlfaq4.html
> if your negligent system adminstrator has been remiss in his duties.)
>
> How do I find the soundex value of a string?
>
> Use the standard Text::Soundex module distributed with perl. But
> before you do so, you may want to determine whether `soundex' is in
> fact what you think it is. Knuth's soundex algorithm compresses
> words into a small space, and so it does not necessarily
> distinguish between two words which you might want to appear
> separately. For example, the last names `Knuth' and `Kant' are both
> mapped to the soundex code K530. If Text::Soundex does not do what
> you are looking for, you might want to consider the String::Approx
> module available at CPAN.
YEEESSSSS!! My blathering is finally in there!
Of course, if you really want to see how 'swell' soundex() is,
just check how many words in /usr/dict/words map to the
soundex value S500 ...
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Fri, 02 Jul 1999 05:55:29 GMT
From: rt_daemon@my-deja.com
Subject: File Not Found
Message-Id: <7lhk8e$30f$1@nnrp1.deja.com>
This may not be Perl but in my cgi-bin directory I see files, created
by mistake from a perl script, that I cannot delete. It says file not
found.
e.g.:
94231541315123 (no extension)
.data
00:15612
How can I possibly delete those ?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 2 Jul 1999 19:22:15 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: File Not Found
Message-Id: <slrn7nq4fj.6ie.fl_aggie@thepentagon.com>
On Fri, 02 Jul 1999 05:55:29 GMT, rt_daemon@my-deja.com
<rt_daemon@my-deja.com>, in <7lhk8e$30f$1@nnrp1.deja.com> wrote:
+ This may not be Perl
It isn't.
+ but in my cgi-bin directory I see files, created
+ by mistake from a perl script, that I cannot delete. It says file not
+ found.
Perl will cheefully hand you all the rope you need to hang yourself... :)
+ How can I possibly delete those ?
Very carefully. A shell that permits file name completions (zsh, bash, tcsh
come to mind, perhaps others), or a graphical file manager. Or you could
write a perl program like so:
opendir(DIR,".") or die "Failed opening this directory: $!";
@files = readdir(DIR);
closedir(DIR);
foreach $file (@files) {
print $file," delete? [n] ";
$yah=<STDIN>;#read the keyboard
unlink $file if $yah=~/^(y|Y)/;
print "\n";
}
Now, this will offer you the opportunity to delete '.' and '..' and is
left as an exercise for the student to autmogically ignore them[*]. There
is likely an alternative 'rm' in the perl power tools (see PPT on
www.perl.com) that may do what you want.
James
[*] Which is to say, I used to know how, but I can't recall and am too
lazy to look it up.
------------------------------
Date: 2 Jul 1999 20:52:12 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: File Not Found
Message-Id: <7lj8ps$1ri$1@gellyfish.btinternet.com>
On 2 Jul 1999 19:22:15 GMT I R A Aggie wrote:
>
> [*] Which is to say, I used to know how, but I can't recall and am too
> lazy to look it up.
Er:
@files = grep !/^\.{1,2}$/, readdir(DIR);
?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Sat, 03 Jul 1999 00:08:47 GMT
From: sowmaster@juicepigs.com (Bob Trieger)
Subject: Re: File Not Found
Message-Id: <7ljkb6$5j5$3@oak.prod.itd.earthlink.net>
[ courtesy cc sent by mail if address not munged ]
rt_daemon@my-deja.com wrote:
>This may not be Perl but in my cgi-bin directory I see files, created
>by mistake from a perl script, that I cannot delete. It says file not
>found.
>
>e.g.:
>94231541315123 (no extension)
>..data
>00:15612
>
>
>How can I possibly delete those ?
perldoc -f unlink
HTH
------------------------------
Date: Thu, 1 Jul 1999 17:38:48 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Filename from <STDIN>
Message-Id: <85ngl7.t44.ln@magna.metronet.com>
Joakim Hove (hove@ido.phys.ntnu.no) wrote:
: Perl must interpret $ARGV[0] as the file name to be related to the <>
: filehandle, and silently opening this file. Have I understood
: correctly?
Yes.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 2 Jul 1999 17:27:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Foreach on hash gives undefined value
Message-Id: <7lispd$1ca$1@gellyfish.btinternet.com>
On Wed, 30 Jun 1999 13:30:46 +1000 Justin Wills wrote:
> yes, yes, there's no code. but back to the question, DON'T use foreach on a
> hash, use each or keys or values
Sorry you seem to have missed the point - how else do you think one is
going to process each of the keys of a hash without using for or foreach
like the original poster was - the problem that Tom was pointing out was
that the posted code was unrunnable .
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 2 Jul 1999 01:24:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <slrn7nomo0.31h.abigail@alexandra.delanet.com>
Ken (kloomis@it-resourcesNOSPAM.com) wrote on MMCXXX September MCMXCIII
in <URL:news:377b9ec4.7863302@news.tiac.net>:
<> abigail@delanet.com (Abigail) wrote:
<>
<> >Ken (kloomis@it-resourcesNOSPAM.com) wrote on MMCXXVIII September
<> >MCMXCIII in <URL:news:3778fac7.13647775@news.tiac.net>:
<> >""
<> >"" Can someone suggest how this would be done?
<> >
<> >
<> >Easy. You check which box is checked, and if a certain box is checked,
<> >your print the different web message. You just omit the step where you
<> >set the info.
<> >
<> >Did you have any Perl specific question,
<>
<> Sounds like Perl to me. Am I wrong?
That sounds Perl to you? What exactly does sound Perlish?
I think you are wrong.
<> >or you like to hang out in
<> >different groups and ask random questions? Maybe you should ask about
<> >penguins in rec.furniture, they have much more humour than we have.
<> >
<>
<> Is it worse not to know something, or to be rude and insulting?
It's rude and insulting to ask off topic questions.
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Fri, 02 Jul 1999 17:36:51 GMT
From: kloomis@it-resourcesNOSPAM.com (Ken)
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <377cf87e.13821801@news.tiac.net>
abigail@delanet.com (Abigail) wrote:
>
><> >or you like to hang out in
><> >different groups and ask random questions? Maybe you should ask about
><> >penguins in rec.furniture, they have much more humour than we have.
><> >
><>
><> Is it worse not to know something, or to be rude and insulting?
>
>
>It's rude and insulting to ask off topic questions.
>
>Abigail
>--
You're an asshole.
Ken Loomis
IT Resources
Lexington, MA
www.it-resources.com
------------------------------
Date: Fri, 02 Jul 1999 18:18:42 GMT
From: kloomis@it-resourcesNOSPAM.com (Ken)
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <377d00dc.15964655@news.tiac.net>
I don't know why everyone his (and especially her) drawers all up in a
bunch about my question. Some generous person answered me off list
and we have been developing Perl scripts that do what I'm looking to
do. We expanded beyond that, developing interesting sub routines and
other segments.
Some people have a need just to be deliberately difficult. Pscych
101, I guess.
Anyhoo, if there are any other helpful people reading, we do have a
problem:
When form info is fed back into a mail program it comes back in e-mail
in jumbled order. How can I format the info so it comes back in the
order I want? In perl!
Ken
Eric The Read <emschwar@rmi.net> wrote:
>kloomis@it-resourcesNOSPAM.com (Ken) writes:
>> abigail@delanet.com (Abigail) wrote:
>> >Easy. You check which box is checked, and if a certain box is checked,
>> >your print the different web message. You just omit the step where you
>> >set the info.
>> >
>> >Did you have any Perl specific question,
>>
>> Sounds like Perl to me. Am I wrong?
>
>Yep. You'd have to do the exact same steps whether you were using Perl,
>ADA, C, SNOBOL, or APL. It's nothing to do with Perl, just general
>control-flow issues.
>
>> Is it worse not to know something, or to be rude and insulting?
>
>Better than either is to realize that just because you're having trouble
>doing something with Perl, that doesn't mean it's Perl's fault.
>
>-=Eric
Ken Loomis
IT Resources
Lexington, MA
www.it-resources.com
------------------------------
Date: 02 Jul 1999 13:04:47 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <xkf908yj2k0.fsf@valdemar.col.hp.com>
kloomis@it-resourcesNOSPAM.com (Ken) writes:
> I don't know why everyone his (and especially her) drawers all up in a
> bunch about my question.
Because it's inappropriate for clpm, and we dislike recieving
inappropriate questions?
> Some people have a need just to be deliberately difficult. Pscych
> 101, I guess.
Yeah-- I guess that explains why you feel the need to post CGI questions
to a Perl newsgroup.
> When form info is fed back into a mail program it comes back in e-mail
> in jumbled order. How can I format the info so it comes back in the
> order I want? In perl!
Cool! So to make any generic programming question into a Perl question,
I just have to use the words "In perl!" and it's magicall transformed
from a question that has nothing to do with Perl into a question that is
only about Perl. Neat trick!
Sheesh, you remind me of Bun Mui. In English usage!
-=Eric
------------------------------
Date: Fri, 02 Jul 1999 21:38:29 GMT
From: kloomis@it-resourcesNOSPAM.com (Ken)
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <377d30a7.28201593@news.tiac.net>
Eric The Read <emschwar@rmi.net> wrote:
>
>> When form info is fed back into a mail program it comes back in e-mail
>> in jumbled order. How can I format the info so it comes back in the
>> order I want? In perl!
>
>Cool! So to make any generic programming question into a Perl question,
>I just have to use the words "In perl!" and it's magicall transformed
>from a question that has nothing to do with Perl into a question that is
>only about Perl. Neat trick!
>
I guess that too tough a question for you?
I still don't understand your problem. I'm trying to accomplish
something using Perl language and you're having a hissy fit.
Ken
Ken Loomis
IT Resources
Lexington, MA
www.it-resources.com
------------------------------
Date: 02 Jul 1999 16:23:39 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <xkf6742itck.fsf@valdemar.col.hp.com>
kloomis@it-resourcesNOSPAM.com (Ken) writes:
> I guess that too tough a question for you?
Is searching FAQs too tough for you? You can find the answer there.
> I still don't understand your problem. I'm trying to accomplish
> something using Perl language and you're having a hissy fit.
No, I'm pointing out (rather calmly, actually) that using Perl to solve a
problem doesn't make the problem a Perl problem. If your question is
"How do I do <foo>?" then it's not really a Perl question, it's you not
understanding what needs to be done. And that lack of understanding is
irrelevant to the language you're using.
If your question is, "I tried to do it this way, but instead of output
<X>, I got output <Y>. I read the documentation and the FAQs, and I
still don't see what I'm doing wrong!", then it's most likely a Perl
question.
Do you see the distinction?
-=Eric
------------------------------
Date: 2 Jul 1999 18:03:44 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Forms Processing - thread started in HTML group
Message-Id: <slrn7nqh9v.31h.abigail@alexandra.delanet.com>
Ken (kloomis@it-resourcesNOSPAM.com) wrote on MMCXXXI September MCMXCIII
in <URL:news:377cf87e.13821801@news.tiac.net>:
$$ abigail@delanet.com (Abigail) wrote:
$$ >
$$ >Abigail
$$
$$ You're an asshole.
Yes, but at least *I* am not stupid.
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
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 8
***********************************