[22213] in Perl-Users-Digest
Perl-Users Digest, Issue: 4434 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 20 18:05:50 2003
Date: Mon, 20 Jan 2003 15:05:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 20 Jan 2003 Volume: 10 Number: 4434
Today's topics:
avoid chaos -or- "protected" writing <little_tux@gmx.net>
Re: avoid chaos -or- "protected" writing <nobull@mail.com>
Re: avoid chaos -or- "protected" writing <jurgenex@hotmail.com>
Re: avoid chaos -or- "protected" writing <mbudash@sonic.net>
Re: avoid chaos -or- "protected" writing <mbudash@sonic.net>
Ayone used Perl2Exe with modules accessing non-autoload <daby55@NOSPAM.com>
Re: Confused - Fork - Thread - Ithread - Ahhhh... (Anno Siegel)
Re: Forced switch from PERL to ASP/VBSCRIPT. Where do I (Jim Lawless)
Re: Formatted printing question (Anno Siegel)
Help With Nested Hash/Array Requested <charlest@indysoft.com>
Re: Help With Nested Hash/Array Requested (Anno Siegel)
Re: Help With Nested Hash/Array Requested <charlest@indysoft.com>
Re: Help With Nested Hash/Array Requested <uri@stemsystems.com>
Re: How can a SMTP mail be deleted from a Unix mailbox (Markus Elfring)
Re: How can a SMTP mail be deleted from a Unix mailbox (Markus Elfring)
Re: How can a SMTP mail be deleted from a Unix mailbox (Markus Elfring)
Re: How to execute a perl script from within a perl scr <pne-news-20030120@newton.digitalspace.net>
Re: Is anyone using Perl 6 yet? <mgjv@tradingpost.com.au>
Re: OT: TOFU, jeopardy and spoilers <steven.smolinski@sympatico.ca>
Re: Quick HTML/CGI/Perl Question <GPatnude@adelphia.net>
Re: Quick HTML/CGI/Perl Question <flavell@mail.cern.ch>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 20 Jan 2003 20:24:25 +0100
From: Lorenz Blum <little_tux@gmx.net>
Subject: avoid chaos -or- "protected" writing
Message-Id: <b0hic2$phu0l$1@ID-68250.news.dfncis.de>
Hi there
I've got a (self-made guestbook) script which you can call with the argument
"user" e.g. script.pl?user=lori. Now I want to make it accessable to all
users, but the problem is: If someone calls it (accidentally or not...)
with a wrong name he'll write into the wrong guestbook and this will make
trouble...
Now how can I manage this problem?
I thought about a hidden tag into the callking HTML which contains a
"secret" number. The script then prooves it with an entry into a database.
But how can I create a tag that the user can't see in the HTML-source but
if "submit" then this value will be sent?
lori
------------------------------
Date: 20 Jan 2003 19:42:53 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: avoid chaos -or- "protected" writing
Message-Id: <u9d6mr8v5u.fsf@wcl-l.bham.ac.uk>
Lorenz Blum <little_tux@gmx.net> writes:
> But how can I create a tag that the user can't see in the HTML-source but
> if "submit" then this value will be sent?
You can't.
There is no way you can produce a program (or an HTML document or
whatever) that when fed into a computer (about whuch you have only
public knowledge) will cause that computer to exhibit a prescribed
behaviour and yet at the same time prevent another person with access
to that program and the same public knowledge from being able to infer
that behaviour.
This is the "perpetual motion machine" of computer programming.
Get over it.
This has nothing to do with Perl.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Mon, 20 Jan 2003 19:52:36 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: avoid chaos -or- "protected" writing
Message-Id: <8sYW9.1094$PR2.606@nwrddc02.gnilink.net>
Lorenz Blum wrote:
> I've got a (self-made guestbook) script which you can call with the
> argument "user" e.g. script.pl?user=lori. Now I want to make it
> accessable to all users, but the problem is: If someone calls it
And your question/contribution regarding Perl is?
jue
------------------------------
Date: Mon, 20 Jan 2003 20:01:17 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: avoid chaos -or- "protected" writing
Message-Id: <mbudash-568100.12011920012003@typhoon.sonic.net>
In article <b0hic2$phu0l$1@ID-68250.news.dfncis.de>,
Lorenz Blum <little_tux@gmx.net> wrote:
> Hi there
>
> I've got a (self-made guestbook) script which you can call with the argument
> "user" e.g. script.pl?user=lori. Now I want to make it accessable to all
> users, but the problem is: If someone calls it (accidentally or not...)
> with a wrong name he'll write into the wrong guestbook and this will make
> trouble...
> Now how can I manage this problem?
see below
> I thought about a hidden tag into the calling HTML which contains a
> "secret" number. The script then proves it with an entry into a database.
> But how can I create a tag that the user can't see in the HTML-source but
> if "submit" then this value will be sent?
you can't
>
> lori
>
this really has nothing to do with perl, but i'll bite...
with your "secret number" idea, you're close... assuming a web-based
scenario:
intitially, you'll want to have a form that collects a userid, but also
some kind of password, to verify that the user who claims she is e.g.,
'lori', really is lori. how were you determining whose guest book it was
up to this point?
that form's action will call a script that verifies that userid/password
combo against a db of some kind. (how the data gets into that db is
another project of its own...)
if the combo's invalid, the script can display an error, or redisplay
the form, or both.
if the combo's valid, the script will generate the "secret number" or
"session id" you mention. since this character string will be written to
a mapping file (or sql table) along with the userid, it will need to be
unique, i.e., not already exist in the file. rather than having to check
in the file, one way is to combine a time-based string with the
referer's ip address. in perl (since you're in a perl n.g.):
my $sessionid = join '', localtime(), $ENV{REMOTE_ADDRESS};
once the mapping entry is written, the userid is never passed back and
forth between server and browser, only the session id. (your script
could also/instead set a cookie with the session id in it, but many
folks turn cookies off, so it's up to you.)
from here on, your original script needs only look for the session id
param, validate it against the mapping file, and continue or report
errors as necessary.
make sense? questions?
------------------------------
Date: Mon, 20 Jan 2003 20:01:22 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: avoid chaos -or- "protected" writing
Message-Id: <mbudash-A227B7.12012320012003@typhoon.sonic.net>
In article <u9d6mr8v5u.fsf@wcl-l.bham.ac.uk>,
Brian McCauley <nobull@mail.com> wrote:
> Lorenz Blum <little_tux@gmx.net> writes:
>
> > But how can I create a tag that the user can't see in the HTML-source but
> > if "submit" then this value will be sent?
>
> You can't.
>
> There is no way you can produce a program (or an HTML document or
> whatever) that when fed into a computer (about whuch you have only
> public knowledge) will cause that computer to exhibit a prescribed
> behaviour and yet at the same time prevent another person with access
> to that program and the same public knowledge from being able to infer
> that behaviour.
>
> This is the "perpetual motion machine" of computer programming.
>
> Get over it.
>
> This has nothing to do with Perl.
true, but not very helpful. rather insulting actually. and you didn't
address the o.p.'s foremost question about session-handling.
why bother replying at all?
------------------------------
Date: Mon, 20 Jan 2003 19:43:19 -0000
From: "Daby" <daby55@NOSPAM.com>
Subject: Ayone used Perl2Exe with modules accessing non-autoloadable dll`s?
Message-Id: <b0hji7$pmf$1@news7.svr.pol.co.uk>
I can`t seem to get a few dll`s included in an exe. WHen I use a module that
uses Win32APP::ODBC (odbc.dll)(auto loaded) and then run perl2exe with the
option -tiny it tells me what files I need and actually copies the files to
the directory of my program. WHen I use a module that uses non-autoloadable
dlls perl2exe just doesn`t seem to want anything to do with the dll file.
D
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003
------------------------------
Date: 20 Jan 2003 19:26:33 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Confused - Fork - Thread - Ithread - Ahhhh...
Message-Id: <b0hih9$6fc$1@mamenchi.zrz.TU-Berlin.DE>
Lao Tzu <LaoTzu@TaoTeChing.co.uk.us> wrote in comp.lang.perl.misc:
> I have a script that works as expected, but I would like to make it better.
> I parses my mbox file and validates e-mail address with a MX lookup. I
> realize that this is not 100% effective, but I am doing this less to block
> spam and more to learn better perl technique.
>
> The script puts all e-mail addresses in a hash.
> Then it uses "while" to process he entire hash.
> It splits the e-mail address by the "@".
> - my($name,$domain) = split"@", $key;
> - It uses Net::DNS to see if a MX record exists for $domain.
>
> It return either a 0 or a 1. 1 means that the MX exists and 0 means it does
> not.
>
> My question is, where should I look so that I can write the script so it can
> do multiple MX lookups at once ?
Start with perlipc.
> I have been reading a bit about threads, and everything I have read so far
> says to stay away.
That is no longer true, threads have lost their experimental status
in the newest Perl version. However, in your case, I'd stay away from
threads for another reason: Perl literature is full of fork()ing solutions
for your problem, but there aren't (m)any tried-and-tested threading
solutions out there yet.
Basically, you'll want to divide the lookups into so many batches and
start a child process for each. Probably "forking open" is the easiest
way to do it and have the child return its results to the parent. Look
for "Safe Pipe Opens" in perlipc for "forking open".
Anno
------------------------------
Date: Mon, 20 Jan 2003 13:43:53 CST
From: jimbo@radiks.net (Jim Lawless)
Subject: Re: Forced switch from PERL to ASP/VBSCRIPT. Where do I begin?
Message-Id: <3e2c4fc8.10976867@news.earthlink.net>
On Wed, 15 Jan 2003 13:10:10 CST, Dan <dharding@uiuc.edu> wrote:
>Due to a merger of university departments, I am potentially being forced
>to change the way I do web development. I've always used PERL for my CGI
>development. I'm now being told by the new derpartment head that "he
>doesn't want PERL running on any of his servers; it's too CPU-intensive"
>so I must now do all coding in VBScript/ASP. Where do I start? (other
>than finding a new job). Are there any "VB for PERL Afficionados" types
>of books or resources? What do you recommend for language references
>(downloadable/printable preferred)? How about "teach yourself" books?
>Assume I've never had any exposure to Visual Basic.
You might want to pick up a couple of O'Reilly books:
ASP in a Nutshell
and
The VBScript Pocket Reference
ASP in a Nutshell describes all of the objects available at run-time (
database objects, request/response/application/session, e-mail,...etc.
) and how to interact with them.
I would assume that you can find a VBScript tutorial on the web, but
the pocket reference is nice to have when you're searching for a
function name and such.
You might also visit this site:
http://www.4guysfromrolla.com
Good luck!
Jim Lawless
jimbo@radiks.net
http://www.radiks.net/~jimbo
passme
--
PLEASE NOTE: comp.infosystems.www.authoring.cgi is a
SELF-MODERATED newsgroup. aa.net and boutell.com are
NOT the originators of the articles and are NOT responsible
for their content.
HOW TO POST to comp.infosystems.www.authoring.cgi:
http://www.thinkspot.net/ciwac/howtopost.html
------------------------------
Date: 20 Jan 2003 19:08:13 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Formatted printing question
Message-Id: <b0hhet$5pd$1@mamenchi.zrz.TU-Berlin.DE>
Jesse Sheidlower <jester@panix.com> wrote in comp.lang.perl.misc:
> I'm trying to do some formatted printing in Perl, and
> while I assume that what I'd like to do is easy, I've
> been having trouble finding the right tools to do
> what I need.
>
> Basically, I'd like to print out information from a database
> onto letter or A4 paper such that each sheet can be split into
> four quarters, each roughly 4" x 6".
>
> Each _quarter_ of the page should look something like:
>
> ---------------------------------------
> |NAME SUBJECT|
> | |
> | |
> | |
> | TITLE |
> | |
> | |
> | |
> | |
> |DATE FOO|
> ---------------------------------------
>
> such that Subject and Foo are right-justified and Title is
> center-justified. Also, in order to fit four of these on a
> standard sheet of paper, it needs to print out lengthwise (so
> that each quarter would be 4 1/4" x 5 1/2" on letter-size
> paper). Finally, each such quarter-page slip is its own, so
> text from one shouldn't spill over into another; yet if there
> are more than four slips, there need to be additional pages,
> one page for every four entries.
>
> I looked at PostScript::TextBlock, but as far as I can tell
> you can't specify either justification or lengthwise printing
> with this. I also wasn't sure how to handle the multipage
> printing.
>
> I am, obviously, not very knowledgable about printing and
> layout so I apologize if I'm missing something very obvious.
I don't think you did. You may want to consider PostScript::MailLabels,
which says:
... Flexible enough to tackle other printing tasks, basically
anything requiring a set [of] fields be printed on a regular grid. ...
At a glance, it doesn't do much for alignment (but provides edit methods,
so you can do it yourself), and I'm not sure if it can do the length-wise-
printing thing. Apart from that it looks quite promising.
Anno
------------------------------
Date: Mon, 20 Jan 2003 14:49:31 -0500
From: "Charles R. Thompson" <charlest@indysoft.com>
Subject: Help With Nested Hash/Array Requested
Message-Id: <v2okmfjo52v658@corp.supernews.com>
I'm working on a little side project here and have hit a brick wall as far
as my experience goes. Some insight from the gurus would be appreciated.
I've been hacking at a weblog reporting system and added function for
resolving ip's/domains to a company name read from a flatfile. Right now
it's a little messy and I'm looking to streamline the method used to resolve
the ip/hostname into the company name. I'm not really deep into coding and
really looking for optimal ideas before I dive in.
Currently the records are stored as follows with tab delimeters:
192.123.39.23,192.123.39.20,mydomain.com CompanyName
http://www.companyname.com
When loading the flatfile I simply set up a hash and key it off each
hostname/ip as a key.
$Addresses{'192.123.39.23'}{1} = 'CompanyName';
$Addresses{'192.123.39.23'}{2} = 'http://www.companyname.com';
$Addresses{'192.123.39.20'}{1} = 'CompanyName';
$Addresses{'192.123.39.20'}{2} = 'http://www.companyname.com';
$Addresses{'mydomain.com'}{1} = 'CompanyName';
$Addresses{'mydomain.com'}{2} = 'http://www.companyname.com';
This makes lookups rather easy by passing the hostname/ip to a function that
returns the companyname/website address, but I want things a bit more
organized and definitely more flexible... especially when it comes to
weeding through the barrage of *aol.com accounts, proxies located in global
corporate domains and various ISPs hitting the server. I'm looking for some
way to reorganize where I could do something like this (pseudo):
$Addresses{'(.*?)aol.com$'}{1} = 'Aol User';
Now I know that won't work.. just illustrating my train of thought for how
I'd like it to perform. Passing an IP/Hostname to a function could just
perform a regexp and return the company name.
I wrote one version of this where I stored the list of possible matches on
the other end of the key value pair but it was quite slow. It was a little
more detailed than this and required an array to be stored in the key for
multiple entires... very slow on large scale reports.
$Addresses{'Aol User'}{1} = '(.*?)aol.com$';
Any ideas on how to best approach this? One caveat I see is the . in IPs and
hostnames possibly causing problems with any kind of eval.
Any input is appreciated.
CT
------------------------------
Date: 20 Jan 2003 19:59:01 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help With Nested Hash/Array Requested
Message-Id: <b0hke5$6fc$2@mamenchi.zrz.TU-Berlin.DE>
Charles R. Thompson <charlest@indysoft.com> wrote in comp.lang.perl.misc:
> I'm working on a little side project here and have hit a brick wall as far
> as my experience goes. Some insight from the gurus would be appreciated.
> I've been hacking at a weblog reporting system and added function for
> resolving ip's/domains to a company name read from a flatfile. Right now
> it's a little messy and I'm looking to streamline the method used to resolve
[...]
> weeding through the barrage of *aol.com accounts, proxies located in global
> corporate domains and various ISPs hitting the server. I'm looking for some
> way to reorganize where I could do something like this (pseudo):
>
> $Addresses{'(.*?)aol.com$'}{1} = 'Aol User';
Look at the module Tie::Hash::Approx. It may encapsulate nicely what
you want to do. I doubt it will be particularly fast, however.
Anno
------------------------------
Date: Mon, 20 Jan 2003 15:40:37 -0500
From: "Charles R. Thompson" <charlest@indysoft.com>
Subject: Re: Help With Nested Hash/Array Requested
Message-Id: <v2onm6a3pr80d3@corp.supernews.com>
Thanks for the point in a direction. This is what I ended up with as a
temporary solution until I can look at it more... just for the sake of
having some code in the thread to have shredded :)
sub ReplaceAddress_addressalias {
my $ROW = '';
my ($addresslist, $companyname,$classification,$isclient) = ('','');
my @addresses = ();
my $addressentry = '';
if (! $addressaliasloaded) {
my $filetoload="$PluginDir/addressalias.txt";
open(ADDRESSALIASFILE,"$filetoload") or error("Error: Couldn't open
AddressAlias file \"$filetoload\": $!");
my $rowcount = 0;
while ($ROW = <ADDRESSALIASFILE>) {
chomp($ROW);
if (($ROW eq '') || ($ROW =~ /^#/)){
}else{
$rowcount++;
my ($companyname,$addresslist,$website,$classification,$isclient) =
split (/\t/, $ROW);
$AddressAliases{$rowcount}{1} = $companyname;
$AddressAliases{$rowcount}{2} = $classification;
$AddressAliases{$rowcount}{3} = $isclient;
$AddressAliases{$rowcount}{4} = $website;
foreach my $elem (split(/,/,$addresslist)) { push
@{$AddressAliases{$rowcount}{5}},$elem; }
}
}
close ADDRESSALIASFILE;
debug("AddressAlias file loaded: ".(scalar keys %AddressAliases)." aliases
found.");
$addressaliasloaded=1;
}
my $addresstoreplace="$_[0]";
my $found = 0;
foreach my $entry(keys %AddressAliases) {
$found = 0;
foreach my $thingy(@{$AddressAliases{$entry}{5}}) {
if ($addresstoreplace =~ /$thingy/) {
if ($AddressAliases{$entry}{2} ne '901')
if ($AddressAliases{$entry}{3} eq '1') {
print qq~<font><img hspace="2" src="~ . $DirIcons .
qq~/classification/~ . $AddressAliases{$entry}{2} . qq~.gif"><a
target="_blank" style="color: #006633; font-weight: bold;"
href="http://www.google.com/search?q=$AddressAliases{$entry}{1}">$AddressAli
ases{$entry}{1}</a></font>~;
}else{
print qq~<font style="color: #FF0000"><img hspace="2" src="~ .
$DirIcons . qq~/classification/~ . $AddressAliases{$entry}{2} . qq~.gif"><a
target="_blank" style="font-weight: bold;color: #FF0000;"
href="http://www.google.com/search?q=$AddressAliases{$entry}{1}">$AddressAli
ases{$entry}{1}</a></font>~;
}
}elsif ($AddressAliases{$entry}{2} eq '901') {
print qq~<font style="color: #999999;"><img hspace="2" src="~ .
$DirIcons . qq~/classification/~ . $AddressAliases{$entry}{2} .
qq~.gif">$AddressAliases{$entry}{1}</font>~;
} else
print qq~<font style="color: #999999;font-weight:bold;"><img
hspace="2" src="~ . $DirIcons . qq~/classification/902.gif"><img hspace="2"
src="~ . $DirIcons . qq~/classification/900.gif">$_[0]</font>~;
}
$found = 1;
last;
}
}
last if ($found == 1);
}
if ($found == 0) { print qq~<font style="color:
#999999;font-weight:bold;"><img hspace="2" src="~ . $DirIcons .
qq~/classification/902.gif"><img hspace="2" src="~ . $DirIcons .
qq~/classification/900.gif">$_[0]</font>~; }
return 1;
}
> > weeding through the barrage of *aol.com accounts, proxies located in
global
> > corporate domains and various ISPs hitting the server. I'm looking for
some
> > way to reorganize where I could do something like this (pseudo):
> >
> > $Addresses{'(.*?)aol.com$'}{1} = 'Aol User';
>
> Look at the module Tie::Hash::Approx. It may encapsulate nicely what
> you want to do. I doubt it will be particularly fast, however.
------------------------------
Date: Mon, 20 Jan 2003 22:43:16 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Help With Nested Hash/Array Requested
Message-Id: <x7n0lvv3wb.fsf@mail.sysarch.com>
>>>>> "CRT" == Charles R Thompson <charlest@indysoft.com> writes:
CRT> Thanks for the point in a direction. This is what I ended up with as a
CRT> temporary solution until I can look at it more... just for the sake of
CRT> having some code in the thread to have shredded :)
CRT> sub ReplaceAddress_addressalias {
CRT> my $ROW = '';
CRT> my ($addresslist, $companyname,$classification,$isclient) = ('','');
CRT> my @addresses = ();
CRT> my $addressentry = '';
none of those initializations are (probably) needed. and it is better to
declare the variables near their first use or scope them tighter
CRT> if (! $addressaliasloaded) {
is that a global? pass it as an arg instead.
and unless is a better choice than if (!)
CRT> my $filetoload="$PluginDir/addressalias.txt";
another global?
CRT> open(ADDRESSALIASFILE,"$filetoload") or error("Error: Couldn't open
CRT> AddressAlias file \"$filetoload\": $!");
if you really want a named file handle then do a
local( *ADDRESSALIASFILE ) before that. but with recent perls you can
use a lexical handle
CRT> my $rowcount = 0;
CRT> while ($ROW = <ADDRESSALIASFILE>) {
CRT> chomp($ROW);
CRT> if (($ROW eq '') || ($ROW =~ /^#/)){
CRT> }else{
horrible formatting/indent there.
also declare $ROW right there.
the null if block is very bad. lose all the braces by using next:
next if $ROW =~ /^\s*$/ ;
next if $ROW =~ /^#/ ;
then just fall through to the rest of this code
CRT> $rowcount++;
CRT> my ($companyname,$addresslist,$website,$classification,$isclient) =
CRT> split (/\t/, $ROW);
CRT> $AddressAliases{$rowcount}{1} = $companyname;
CRT> $AddressAliases{$rowcount}{2} = $classification;
CRT> $AddressAliases{$rowcount}{3} = $isclient;
CRT> $AddressAliases{$rowcount}{4} = $website;
why the numeric indices when you could use useful names for keys?
CRT> foreach my $elem (split(/,/,$addresslist)) { push
CRT> @{$AddressAliases{$rowcount}{5}},$elem; }
puch can take a list so skip the for loop:
push @{$AddressAliases{$rowcount}{5}}, split(/,/,$addresslist) ;
CRT> my $addresstoreplace="$_[0]";
don't process sub args so far away. and lose the "" as they are not
needed and can cause bugs there
too tired to do more code review. up there is plenty for you to learn
already.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
Damian Conway Perl Classes - January 2003 -- http://www.stemsystems.com/class
------------------------------
Date: 20 Jan 2003 13:38:04 -0800
From: Markus.Elfring@web.de (Markus Elfring)
Subject: Re: How can a SMTP mail be deleted from a Unix mailbox by a script?
Message-Id: <40ed1d8f.0301201338.5c22bb11@posting.google.com>
- Internet Message Format (Obsoletes: 822)
http://ietf.org/rfc/rfc2822.txt
- Thanks for your good explanation.
------------------------------
Date: 20 Jan 2003 13:42:41 -0800
From: Markus.Elfring@web.de (Markus Elfring)
Subject: Re: How can a SMTP mail be deleted from a Unix mailbox by a script?
Message-Id: <40ed1d8f.0301201342.76ea7189@posting.google.com>
mail summary files
http://www.jwz.org/doc/mailsum.html
------------------------------
Date: 20 Jan 2003 13:52:00 -0800
From: Markus.Elfring@web.de (Markus Elfring)
Subject: Re: How can a SMTP mail be deleted from a Unix mailbox by a script?
Message-Id: <40ed1d8f.0301201352.50821db9@posting.google.com>
2.6 Jim White (http://groups.google.de/groups?group=comp.lang.java.programmer&selm=tFLW9.28326%24Ji6.909414%40news2.west.cox.net)
pointed to some very useful links about JavaMail.
- http://www.dog.net.uk/knife/
- http://java.sun.com/products/javamail/Third_Party.html
------------------------------
Date: Mon, 20 Jan 2003 21:18:03 +0100
From: Philip Newton <pne-news-20030120@newton.digitalspace.net>
Subject: Re: How to execute a perl script from within a perl script and return info
Message-Id: <julo2v45akcpdnvbfqat614tcf24lq3nl8@4ax.com>
On Sun, 19 Jan 2003 20:27:01 +0100, "Harald H.-J. Bongartz"
<bongie@gmx.net> wrote:
> Alan J. Flavell wrote:
> > However, there then seems to be no appropriate place for
> > discussing language-neutral CGI issues.
>
> The german general CGI group had almost no traffic lately
> (<< 1 post/day), and some of the postings even were about Perl CGI, so
> the rmgroup was perhaps okay (although I voted against it, same
> reasoning as yours).
As did I (also for the same reason).
I still think it's a pity.
Cheers,
Philip
--
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
------------------------------
Date: Tue, 21 Jan 2003 09:23:51 +1100
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Is anyone using Perl 6 yet?
Message-Id: <slrnb2otnn.7m2.mgjv@martien.heliotrope.home>
On 20 Jan 2003 05:16:38 -0800,
Sara <genericax@hotmail.com> wrote:
> I'm considering replacing one of my boxes running 5.x with 6. That
> will only be for experimenting and learning however, no plans to
> migrate any production code, even though at OSCON the talk on that
> topic indicated the migration was pretty straightforward in many
> cases.
Perl 6 is not ready for use, unless you like heavy experimention. The
language hasn't even fully been defined yet.
Perl 6 is a new language, with many, many new features. Most Perl 5 code
will work on it, but there are certain things that are gone. It should
all come with
> At any rate, what kind of popularity is it enjoying?
None, really. It is only realy used by people developing it and
interested enthusiasts. It has not been released at all for public
consumption.
See http://dev.perl.org/perl6/ for the current status on the language,
and http://www.parrotcode.org/ for the current status on the platform
Perl6 will run on.
> Are you using it in production or just testing/playing?
No one should even consider using it for production. The current version
of parrot is 0.0.9, which should be a clear signal to anyone that it is
in no way even close to release.
> What was it like migrating old code to 6?
Most of that could be done by tools which are going to be part of the
Perl6 release, which should take care of backward compatibility problems.
> Thanks. I'm pretty surprized that 6 appeared to be a big event at
> OSCON last July, yet I almost never see it mentioned here. I know the
Because it isn't ready for public release. It is, however, a very
exciting step forward for Perl.
> team worked hard to put it out (I was even on it for awhile), and I
> also believe it addressed many shortcomings and nuisences found in
> 5.x. I want to get it installed here and maybe try to start getting
> some production ported over. I'd love to hear your comments.
You can certainly get it installed, but you should not even consider
letting it near any production level processing. You can port your
production code in a dev environment, just to see what it does, but
don't use it for production.
Unless you enjoy playing with very early releases of stuff, don't do it.
Unless you understand how premature these releases are, you could easily
mistake a potential lack of speed, portability, stability or
functionality (I am not saying any of these exist in parrot, BTW) as
problems with the concept, and get disillusioned before the stuff is
even released.
Martien
--
|
Martien Verbruggen |
| What's another word for Thesaurus?
|
------------------------------
Date: Mon, 20 Jan 2003 22:26:21 GMT
From: Steven Smolinski <steven.smolinski@sympatico.ca>
Subject: Re: OT: TOFU, jeopardy and spoilers
Message-Id: <hI_W9.1494$VS6.275799@news20.bellglobal.com>
Uri Guttman <uri@stemsystems.com> wrote:
>
> the entire group enforces the rule that those posts have spoiler in
> their subject and plenty of blank (or spoiler) lines before the actual
> spoiler itself.
I dislike this, because of the scrolling. My (and many other good)
newsreader(s) interpret anything after an ascii 0x0c (^L or FF) as a
spoiler, and mask the text as all asterisks. When a special key is
pressed, the spoilers are revealed.
It's quite a good system, that doesn't involve unintended reading, and
doesn't require tedious scrolling. Unfortunately, Microsoft newsreaders
don't support it, so it's not practical to enforce.
> this has an interesting and positive side effect. you almost never see
> top posting!! you can't do the jeopardy style of the reply at the top
> with a spoiler and THEN spoiler space below. :)
I have seen bad side effects, with TOFU including the spoiler space, and
perpetuating threads where 90% of the lines are empty quoted spoiler
space.
Steve
--
Steven Smolinski => http://arbiter.ca/
GnuPG Public Key => http://arbiter.ca/steves_public_key.txt
=> or email me with 'auto-key' in the subject.
Key Fingerprint => 08C8 6481 3A7B 2A1C 7C26 A5FC 1A1B 66AB F637 495D
------------------------------
Date: Mon, 20 Jan 2003 19:14:17 GMT
From: "codeWarrior" <GPatnude@adelphia.net>
Subject: Re: Quick HTML/CGI/Perl Question
Message-Id: <dUXW9.87057$VA5.14592041@news1.news.adelphia.net>
"Kamal" <kamalhyder@hotmail.com> wrote in message
news:cdddc935.0301191937.76126bea@posting.google.com...
> Hello All,
>
> I have a quick HTML/CGI/Perl question and I hope you can help me. I
> don't do this stuff every day so I feel a little stuck.
>
> I have to write Perl scripts that get some user search criteria,
> search a mysql database, and generate results on the screen. There
> are two levels of search: based on the user search criteria, table1 is
> generated from the database, and, if the user clicks on a cell in a
> particular column, table2 is generated from the same database (but a
> different query). My CGI code is working fine for generating table1
> and table2, but the missing piece is where the user clicks on a cell
> in table1. that should launch the CGI script that generates table2.
>
> I figured I could generate table1 as a form so that each click fires
> off the same CGI with different parameters. To try this out, I wrote
> the following HTML snippet that should launch the CGI:
>
> <html>
> <head>
> <title>Link Test Page</title> </head>
>
> <body>
> <h3 align=center>Link Test Page</h3>
>
> <form method="POST" action="../cgi-bin/linktest.cgi">
> <a href="" onClick='return ("Link1")'>Link1</a>
> <a href="" onClick='return ("Link2")'>Link2</a>
> </form>
>
> </body>
> </html>
>
> I cannot put a URL in the above HREF because then a click would take
> the user to that URL.
>
> The CGI script that the above HTML should invoke looks like this:
>
> #!/usr/bin/perl -w
> use CGI ':standard';
>
> &startHTML;
>
> print "<CENTER><H1>Perl Link Test\n</H1><CENTER>\n";
>
> print "\n";
> print a({-href=>"../linktest.html"}, "Back to HTML");
>
> print $query->end_html;
>
> exit (0);
>
> sub startHTML
> {
> $query = new CGI;
> print $query->header;
> print $query->start_html('Perl Link Test');
> }
>
> The HTML code does not work. When I click on the links, I get a test
> message from apache. I know that apache is running - I can launch
> other scripts that I have written, and they work fine.
>
> Do you know what's going on? How can I achieve the desired result?
>
> Thanks,
> -Kamal
Two methods:
1) make your "onClick" handler do "document.forms.FORMNAME.submit()"
OR
2) Put a link in each cell with <A HREF =
'../cgi-bin/linktest.cgi?submit=getcelldata&LINK=$Link1'>Cell Tag</A>
Then -- In your CGI -- YOu need to intercept the CGI params...
if ($CGI->param('submit') eq 'getcelldata') {
my $link = $CGI->param('link');
dootherquery($link);
}
sub dootherquery($) {
my $link = shift;
....
....
}
------------------------------
Date: Mon, 20 Jan 2003 21:08:05 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Quick HTML/CGI/Perl Question
Message-Id: <Pine.LNX.4.40.0301202044550.15976-100000@lxplus071.cern.ch>
On Jan 20, codeWarrior demonstrates the problems with getting
clues on an inappropriate group by quoting the entire
posting, complete with sig, and then opining:
> Two methods:
>
> 1) make your "onClick" handler do "document.forms.FORMNAME.submit()"
Might be a good idea to warn the original poster that it's unwise
to make a web page critically dependent on client-side javascript.
(Optional extras might be different). This of course has nothing to
do with Perl, but would be better addressed on a WWW-related group.
> OR
> 2) Put a link in each cell with <A HREF =
> '../cgi-bin/linktest.cgi?submit=getcelldata&LINK=$Link1'>Cell Tag</A>
^^^^^
HTML syntax error. Unless you want &LINK parsed by HTML as an entity
(which you evidently don't), the syntax rules call for the ampersand
to be represented in &-notation, e.g as &
We still haven't seen any Perl relevance.
> Then -- In your CGI -- YOu need to intercept the CGI params...
>
> if ($CGI->param('submit') eq 'getcelldata') {
Looks like the germ of an idea, but what's this "$CGI" ?
I'm reminded of J.Korpela's 42 laws of Usenet, in particular the
subject line immediately calls-out number 36:
# A quick question is one that was formulated quickly, thus greatly
# increasing the time needed for getting a useful answer.
IMHO the original poster should take a step back to get the bigger
picture; if a form is submitted and a script is run in order to
generate table 1, which contains things which need to be submitted in
order to generate table 2, then it might be appropriate to have the
first script writing table 1 as a form, with the appropriate data
written into it. Seems to me that Javascript is a useless
complication in this instance.
Of course, none of this is specific to Perl.
all the best
(warum die de.*-ler hier mitbetroffen sind ist mir schleierhaft,
b.t.w - F'ups gesetzt.)
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 4434
***************************************