[24729] in Perl-Users-Digest
Perl-Users Digest, Issue: 6884 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 19 18:06:05 2004
Date: Thu, 19 Aug 2004 15:05:13 -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 Thu, 19 Aug 2004 Volume: 10 Number: 6884
Today's topics:
ANNOUNCE: Spreadsheet::WriteExcel 2.04 <jmcnamara@cpan.org>
Can I modify scalars contained in the array ref returne (Aaron Anodide)
Re: Can I modify scalars contained in the array ref ret <gnari@simnet.is>
Re: capture scoping <tadmc@augustmail.com>
Re: capture scoping (Gary E. Ansok)
Re: capture scoping <jeff@spamalanadingong.com>
Re: capture scoping <jeff@spamalanadingong.com>
Re: capture scoping <1usa@llenroc.ude.invalid>
Clean Quarantine Script <nospam.hciss@yahoo.com>
Re: Clean Quarantine Script <postmaster@castleamber.com>
Re: Clean Quarantine Script <pinyaj@rpi.edu>
Database vs Text for text search <SaveWorldFromAids@alexa.com>
Device::Gsm v1.34 released to CPAN <cosimo@cpan.org>
Device::Modem v1.39 released to CPAN <cosimo@cpan.org>
Re: Earthquake forecasting program Aug. 16, 2004 <bobofficers@invalid.net>
Re: Earthquake forecasting program Aug. 16, 2004 <bobofficers@invalid.net>
Re: Earthquake forecasting program Aug. 16, 2004 (Randal L. Schwartz)
Re: editing perl script through TEXTAREA ctcgag@hotmail.com
Re: editing perl script through TEXTAREA <noreply@gunnar.cc>
Re: editing perl script through TEXTAREA <flavell@ph.gla.ac.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 18 Aug 2004 23:05:26 GMT
From: John McNamara <jmcnamara@cpan.org>
Subject: ANNOUNCE: Spreadsheet::WriteExcel 2.04
Message-Id: <I2pKs7.1vr0@zorch.sf-bay.org>
======================================================================
ANNOUNCE
Spreadsheet::WriteExcel version 2.04 has been uploaded to CPAN.
http://search.cpan.org/~jmcnamara/Spreadsheet-WriteExcel
======================================================================
NAME
Spreadsheet::WriteExcel - Write formatted text and numbers to a
cross-platform Excel binary file.
======================================================================
CHANGES
! Fixed handling of Euro symbol in num_format() strings.
! Renamed the Excel 5 style merge() format to the more correct
center_across(). Updated examples accordingly.
! Added bug warning about using merge formats outside of
merged ranges.
+ Fixed handling of double quotes in formula strings.
Thanks to a tip from merlyn.
+ The 2.xx versions are now compatible with MS Access. Removed
statements to the contrary.
======================================================================
DESCRIPTION
The Spreadsheet::WriteExcel module can be used create a cross-
platform Excel binary file. Multiple worksheets can be added to a
workbook and formatting can be applied to cells. Text, numbers,
formulas and hyperlinks and images can be written to the cells.
The Excel file produced by this module is compatible with
Excel 97, 2000, 2002 and 2003.
The module will work on the majority of Windows, UNIX and
Macintosh platforms. Generated files are also compatible with the
Linux/UNIX spreadsheet applications Gnumeric and OpenOffice.org.
This module cannot be used to read an Excel file. See
Spreadsheet::ParseExcel or look at the main documentation for some
suggestions.
This module cannot be used to write to an existing Excel file.
======================================================================
SYNOPSIS
To write a string, a formatted string, a number and a formula to
the first worksheet in an Excel workbook called perl.xls:
use Spreadsheet::WriteExcel;
# Create a new Excel workbook
my $workbook = Spreadsheet::WriteExcel->new("perl.xls");
# Add a worksheet
$worksheet = $workbook->add_worksheet();
# Add and define a format
$format = $workbook->add_format(); # Add a format
$format->set_bold();
$format->set_color('red');
$format->set_align('center');
# Write a formatted and unformatted string
$col = $row = 0;
$worksheet->write($row, $col, "Hi Excel!", $format);
$worksheet->write(1, $col, "Hi Excel!");
# Write a number and a formula using A1 notation
$worksheet->write('A3', 1.2345);
$worksheet->write('A4', '=SIN(PI()/4)');
======================================================================
REQUIREMENTS
This module requires Perl 5.005 (or later), Parse::RecDescent and
File::Temp
http://search.cpan.org/search?dist=Parse-RecDescent
http://search.cpan.org/search?dist=File-Temp
======================================================================
AUTHOR
John McNamara (jmcnamara@cpan.org)
--
------------------------------
Date: 19 Aug 2004 13:42:27 -0700
From: anodide@hotmail.com (Aaron Anodide)
Subject: Can I modify scalars contained in the array ref returned by DBI
Message-Id: <2db1147f.0408191242.2867b75@posting.google.com>
Hi,
I'm fairly new to PERL. The following code fetches a row from DBI as
an array ref. It then sends a reference to an element of that array
to a sub which modifies it in place. This effectively (i think)
modifies the original string which was returned by DBI.
My question is: Is this OK? Are the scalars in the array returned
from DBI special in any way, such that I might corrupt memory by doing
this?
Thanks in advance,
Aaron Anodide
sub CleanXMLString
{
my $s_ref = shift;
$$s_ref =~ s/\&/\&\;/g;
$$s_ref =~ s/\</\<\;/g;
$$s_ref =~ s/\>/\>\;/g;
}
my $sql = "SELECT x,y FROM TT WHERE ID=1";
$sth = $dbh->prepare($sql);
$sth->execute();
$row_ref = $aref = $sth->fetchrow_arrayref;
CleanXMLString( \$row_ref->[0] );
CleanXMLString( \$row_ref->[1] );
------------------------------
Date: Thu, 19 Aug 2004 21:15:39 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: Can I modify scalars contained in the array ref returned by DBI
Message-Id: <cg3560$luq$1@news.simnet.is>
"Aaron Anodide" <anodide@hotmail.com> wrote in message
news:2db1147f.0408191242.2867b75@posting.google.com...
> Hi,
>
> I'm fairly new to PERL. The following code fetches a row from DBI as
> an array ref. It then sends a reference to an element of that array
> to a sub which modifies it in place. This effectively (i think)
> modifies the original string which was returned by DBI.
>
> My question is: Is this OK? Are the scalars in the array returned
> from DBI special in any way, such that I might corrupt memory by doing
> this?
yes, in the case of DBI, it is OK.
gnari
------------------------------
Date: Thu, 19 Aug 2004 09:35:39 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: capture scoping
Message-Id: <slrnci9elr.hvp.tadmc@magna.augustmail.com>
Jeff Thies <jeff@spamalanadingong.com> wrote:
> I'm having some trouble understanding/controlling the scope of $1.
Three followups all asking for more or complete information.
What a needless waste of time. Please consider being more
considerate of Other People's time.
Have you seen the Posting Guidelines that are posted here frequently?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 19 Aug 2004 16:49:37 +0000 (UTC)
From: ansok@alumni.caltech.edu (Gary E. Ansok)
Subject: Re: capture scoping
Message-Id: <cg2ln1$1kk$1@naig.caltech.edu>
In article <HT0Vc.27479$nx2.12134@newsread2.news.atl.earthlink.net>,
Jeff Thies <jeff@spamalanadingong.com> wrote:
> I'm having some trouble understanding/controlling the scope of $1.
>
> I have this:
>
>$data=~s/<input .*?type="text" .*?value="(.*?)".*?>/$1/gs;
>
>amongst other regexes.
>
> This flies apart when the match is empty (ie: value=""), it then uses
>the next match which is not empty even though that may in a different
><input ...>
>
>How do I get the regex to sub in a "".
>
>I printed out perldoc perlre a while ago and maybe this is in there, but
>I can't find it!
Not sure what your problem is -- if you have value="" it should
match just fine, with $1 being the empty string.
Now, if the value="" is completely missing (or doesn't use double-quotes),
then it will look for a value=" in some other part of the data, which
would be bad.
You can try to work around this by replacing .*? with [^>]* (except for
value=[^"]*), but this can still fail for some input data.
This is why many will suggest that you do not try to work with HTML or
XML using regular expressions -- use a module designed for the purpose,
such as HTML::Parser.
Gary Ansok
--
Though menu is ostensibly "about" food-service-industry purchase options,
when seen in context of transnational cultural imperialism and the struggle
for decolonization, menu is actually "about" the unknowing participation of
bourgeois, hierarchical assumptions in the exploitation of the Third World.
------------------------------
Date: Thu, 19 Aug 2004 20:58:06 GMT
From: Jeff Thies <jeff@spamalanadingong.com>
Subject: Re: capture scoping
Message-Id: <yv8Vc.2979$2L3.992@newsread3.news.atl.earthlink.net>
Gary E. Ansok wrote:
> In article <HT0Vc.27479$nx2.12134@newsread2.news.atl.earthlink.net>,
> Jeff Thies <jeff@spamalanadingong.com> wrote:
>
>> I'm having some trouble understanding/controlling the scope of $1.
>>
>> I have this:
>>
>>$data=~s/<input .*?type="text" .*?value="(.*?)".*?>/$1/gs;
>>
>>amongst other regexes.
>>
>> This flies apart when the match is empty (ie: value=""), it then uses
>>the next match which is not empty even though that may in a different
>><input ...>
>>
>>How do I get the regex to sub in a "".
>>
>>I printed out perldoc perlre a while ago and maybe this is in there, but
>>I can't find it!
>
>
> Not sure what your problem is -- if you have value="" it should
> match just fine, with $1 being the empty string.
>
> Now, if the value="" is completely missing (or doesn't use double-quotes),
> then it will look for a value=" in some other part of the data, which
> would be bad.
That appears to be the case:
Data looks like this:
<tr><td align="right" class="l">Last Name</td><td><input type="text"
name="last_name" value="Test" size="30" /> </td></tr>
<tr><td align="right" class="l">Company</td><td><input type="text"
name="company" size="30" /> </td></tr>
<tr><td align="right" class="l">Title</td><td><input type="text"
name="title" size="30" /> </td></tr>
<tr><td align="right" class="l">Address 1</td><td><input type="text"
name="address_1" value="12346 W 99th" size="30" /> </td></tr>
(I'm replacing text fields with just their value, form elements were
generated by CGI.pm)
And what I hadn't realized late last night was that the value="" was
completely missing!
>
> You can try to work around this by replacing .*? with [^>]* (except for
> value=[^"]*), but this can still fail for some input data.
I'll give it a whirl.
Thanks, and my apologies to others for misstating the question.
Jeff
>
> This is why many will suggest that you do not try to work with HTML or
> XML using regular expressions -- use a module designed for the purpose,
> such as HTML::Parser.
>
> Gary Ansok
------------------------------
Date: Thu, 19 Aug 2004 21:06:44 GMT
From: Jeff Thies <jeff@spamalanadingong.com>
Subject: Re: capture scoping
Message-Id: <ED8Vc.27988$nx2.793@newsread2.news.atl.earthlink.net>
Tad McClellan wrote:
> Jeff Thies <jeff@spamalanadingong.com> wrote:
>
>
>> I'm having some trouble understanding/controlling the scope of $1.
>
>
>
> Three followups all asking for more or complete information.
The last thing I want is to waste the time of anyone here. I'm deeply
appreciative of the regulars here.
I thought I had provided sufficient information but I see now that I was
missing part of the my puzzle. (See follow up to Gary's reply)
>
> What a needless waste of time. Please consider being more
> considerate of Other People's time.
>
>
> Have you seen the Posting Guidelines that are posted here frequently?
No I haven't. This apparently is filtered out by my news account (I've
never seen it). While I'm changing my usenet account, if you wish, you
can point me at that.
Cheers,
Jeff
>
>
------------------------------
Date: 19 Aug 2004 21:09:42 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: capture scoping
Message-Id: <Xns954AAE949199Casu1cornelledu@132.236.56.8>
Jeff Thies <jeff@spamalanadingong.com> wrote in news:ED8Vc.27988$nx2.793
@newsread2.news.atl.earthlink.net:
> Tad McClellan wrote:
>
>> Have you seen the Posting Guidelines that are posted here frequently?
>
> No I haven't. This apparently is filtered out by my news account (I've
> never seen it). While I'm changing my usenet account, if you wish, you
> can point me at that.
Google is you friend:
http://www.google.com/search?q=comp.lang.perl.misc+posting+guidelines
You are still wasting other people's time not googling first.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Thu, 19 Aug 2004 11:15:48 -0500
From: "Matt" <nospam.hciss@yahoo.com>
Subject: Clean Quarantine Script
Message-Id: <10i9ki3jficmaee@corp.supernews.com>
The following script will not work to delete files with weird charaters such
as:
coords .scr
DVDR- MOVIES.txt.scr
href .exe
null) .rar
acct_backup.2004-08-11.tar.gz
acct_backup.2004-08-12.tar.gz
It won't delete any of those files. Can anyone tell me how to fix that?
Thanks.
Matt
#!/usr/bin/perl
#
# IMPORTANT NOTE:
#
# Change the next line to 0 instead of 1 to enable this script.
# By default it will be disabled and will not do anything.
#
$disabled = 0;
$quarantine_dir = '/quarantine/';
$days_to_keep = 3;
exit if $disabled;
# Standardise the format of the directory name
die 'Path for quarantine_dir must be absolute' unless $quarantine_dir =~
/^\//;
$quarantine_dir =~ s/\/$//; # Delete trailing slash
# Now get the content list for the directory.
opendir(QDIR, $quarantine_dir) or die "Couldn't read directory
$quarantine_dir";
# Loop through this list looking for any *directory* which hasn't been
# modified in the last $days_to_keep days.
# Unfortunately this will do nothing if the filesystem is backed up using
tar.
while($entry = readdir(QDIR)) {
next if $entry =~ /^\./;
$entry = $quarantine_dir . '/' . $entry;
system("rm -rf $entry") if -d $entry &&
-M $entry > $days_to_keep;
}
closedir(QDIR);
------------------------------
Date: 19 Aug 2004 17:27:42 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Clean Quarantine Script
Message-Id: <Xns954A7EC48A42Acastleamber@130.133.1.4>
"Matt" <nospam.hciss@yahoo.com> wrote in
news:10i9ki3jficmaee@corp.supernews.com:
> The following script will not work to delete files with weird
> charaters such as:
>
> coords .scr
> DVDR- MOVIES.txt.scr
> href .exe
> null) .rar
> acct_backup.2004-08-11.tar.gz
> acct_backup.2004-08-12.tar.gz
>
> It won't delete any of those files. Can anyone tell me how to fix
> that?
Escape the spaces. Delete a file manually to see the syntax. Also, you have
a *serious* security issue, or so it seems, since I see weird characters in
the filenames, probably copied from email attachement(s)? Beter check your
filenames before you start writing, and remove/fix dangerous characters.
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: Thu, 19 Aug 2004 13:58:37 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: Clean Quarantine Script
Message-Id: <Pine.SGI.3.96.1040819135704.1357379A-100000@vcmr-64.server.rpi.edu>
On Thu, 19 Aug 2004, Matt wrote:
>The following script will not work to delete files with weird charaters such
>as:
>
>coords .scr
>DVDR- MOVIES.txt.scr
>href .exe
>null) .rar
>acct_backup.2004-08-11.tar.gz
>acct_backup.2004-08-12.tar.gz
What weird characters do those last two have? Maybe you just don't have
the permissions...
Anyway, don't use "rm -rf ...". Just use Perl's unlink() function.
my $actually_deleted = unlink @files_to_remove;
warn "couldn't delete @{[ grep -e @files_to_remove ]}"
unless $actually_deleted == @files_to_remove;
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
RPI Corporation Secretary % have long ago been overpaid?
http://japhy.perlmonk.org/ %
http://www.perlmonks.org/ % -- Meister Eckhart
------------------------------
Date: Thu, 19 Aug 2004 20:45:55 GMT
From: "http://links.i6networks.com" <SaveWorldFromAids@alexa.com>
Subject: Database vs Text for text search
Message-Id: <7k8Vc.437169$rCA1.255614@news01.bloor.is.net.cable.rogers.com>
At what level a database will be better for a read only text search?
I have some records, each has 6 fields. Each record has a pararent record.
Each parent has less than 100 childs.
Total records is about 1000-1500.
I want to put everthing in one single file, or put each parent and their
children in a file so I can have 20-30 files.
I am afraid to go to the database route, because the limitation of concurent
connections and the overhead of database search.
Is there a cut-off number of records, below that line, text is better, above
it, database is better?
------------------------------
Date: Wed, 18 Aug 2004 07:53:17 GMT
From: Cosimo Streppone <cosimo@cpan.org>
Subject: Device::Gsm v1.34 released to CPAN
Message-Id: <I2pKry.1wIp@zorch.sf-bay.org>
Version 1.34 of Device::Gsm perl extension has been released to CPAN,
and should be available at your local CPAN mirror in a day or two.
Changes
-------------
1.33 => 1.34
Wed Aug 18 09:10:48 CEST 2004
- fixed delete_sms() command syntax and results parsing.
Thanks to all users that reported problems.
- added an example script on how to delete sms messages.
What it is?
------------
Device::Gsm is perl extension to talk to your gsm mobile phone
via serial port, bluetooth, irda, ... and reads/writes sms messages,
reads battery level, signal, imei(serial) number, makes calls,
and everything is allowed by the GSM AT+C command set.
It works at least on Windows, Linux, Solaris and *BSD systems.
Prerequisites
-------------
+ working perl installation >= 5.005_03
+ Device::Modem (most recent version is fine)
+ Device::SerialPort (or Win32::SerialPort for Windows systems)
+ a gsm mobile phone, or oem device, compliant with AT+C GSM
command set (nearly every model is AT+C compliant)
Installation
------------
This module installs like all other good old perl modules:
$ perl Makefile.PL
$ make
$ make test
$ make install
Licensing terms
---------------
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Use it at your own risk, and without ANY warranty!
For any need of commercial support and/or licensing, please contact
me directly: Cosimo Streppone <cosimo@cpan.org>
------------------------------
Date: Wed, 18 Aug 2004 07:49:31 GMT
From: Cosimo Streppone <cosimo@cpan.org>
Subject: Device::Modem v1.39 released to CPAN
Message-Id: <I2pKrq.1vqA@zorch.sf-bay.org>
Version 1.39 of Device::Modem perl extension has been released to CPAN,
and should be available at your local CPAN mirror in a day or two.
Changes
-------------
1.36 => 1.39
Wed Aug 18 09:21:50 CET 2004
- parse_answer() now in scalar context (string) returns *all* modem
answer instead of removing the last string (OK/ERROR/...).
This should correct many reported problems...
- new example scripts: caller-id.pl and xmodem.pl
What it is?
------------
Device::Modem is a perl extension to talk to AT compliant devices via
serial ports. It should be enough platform independent as you need.
Prerequisites
-------------
+ working perl installation >= 5.005_03
+ Device::SerialPort >= 0.19 (Win32::SerialPort on Windows)
+ a modem or AT-compliant device if you want to use
it for some real work
Installation
------------
This module installs like all other good old perl modules:
$ perl Makefile.PL
$ make
$ make test
$ make install
Licensing terms
---------------
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Additionally, this is BETA software, so use it at your own risk,
and without ANY warranty!
For any need of commercial support and/or licensing, please contact
me directly: Cosimo Streppone <cosimo@cpan.org>
Advertising :-)
---------------
Check out also Device::Gsm module from the same author
to work with GSM devices connected via serial port.
------------------------------
Date: Thu, 19 Aug 2004 12:30:19 -0700
From: Bob Officer <bobofficers@invalid.net>
Subject: Re: Earthquake forecasting program Aug. 16, 2004
Message-Id: <mrv9i0tot6cd6pejhbldalmd4sd559ebvv@4ax.com>
Keywords: X
On Thu, 19 Aug 2004 12:56:29 GMT, in sci.geo.earthquakes, "edgrsprj"
<edgrsprj@ix.netcom.com> wrote:
>"Bob Officer" <bobofficers@invalid.net> wrote in message
>news:da18i05ioseql894qc8s6v71eri46bqqpo@4ax.com...
>> On Wed, 18 Aug 2004 06:24:39 GMT, in sci.geo.earthquakes, "edgrsprj"
>> <edgrsprj@ix.netcom.com> wrote:
>>
>
>> It isn't yours. it was however written for you. If spent better part of a
>> year in comp groups begging for help. I doubt you have any idea how the
>> program works or what it does.
>>
>
>August 19, 2004
>
>I have no idea what this person is talking about. I myself have created and
>am using four separate earthquake forecasting computer programs. The one
>which I am presently making available to people is a Perl language program
>one version of which I copyrighted earlier this year. It is pretty rough,
>especially with its latest version. And no Perl programming expert that I
>know of would ever take credit for writing it even if someone else had. The
>other programs are written in other computer languages. To a large extent
>these programs represent something like 15 other computer programs which
>were developed over about 15 years and eventually merged into those four.
Odd I have other usenet messages where you stated it was written by another
person, and other message I have seen which state you have no programming
experience.
>The Perl program is gradually having new subroutines added to it. The goal
>is to eventually merge the functions of the other 3 programs into that one
>program.
Sure...
>He is partly correct about one thing though. I really don't know why that
>Perl program works. It is based on a geophysics theory picture which I
>developed and which appears to be accurate as far as it goes. But no one
>that I know of can explain exactly what it is telling us about the true
>nature of earthquake triggering processes.
>
--
Ak'toh'di
------------------------------
Date: Thu, 19 Aug 2004 12:45:38 -0700
From: Bob Officer <bobofficers@invalid.net>
Subject: Re: Earthquake forecasting program Aug. 16, 2004
Message-Id: <6q0ai0lrj7nbqha46q3aug2hn2ell7chl6@4ax.com>
Keywords: X
On Wed, 18 Aug 2004 15:31:05 GMT, in sci.geo.earthquakes, "John W. Kennedy"
<jwkenne@attglobal.net> wrote:
>Oriel36 wrote:
>> All gravitational observations are based on the sidereal format which
>> is the only means to determine a geocentric/heliocentric orbital
>> equivalency.After Kepler,Galileo and others struggled for recognition
>> of the heliocentric motion of the planets,Newton reverted back to an
>> odd mixture of geocentrism and heliocentrism to get his gravitational
>> agenda to work.He used Flamsteed erroneous proof for axial
>> rotational/stellar circumpolar equivalency and morphed it into a
>> geocentric/heliocentric orbital equivalency.
>>
>>
>> "PHÆNOMENON IV.
>> That the fixed stars being at rest, the periodic times of the five
>> primary planets, and (whether of the sun about the earth, or) of the
>> earth about the sun, are in the sesquiplicate proportion of their mean
>> distances from the sun.
>>
>> http://members.tripod.com/~gravitee/phaenomena.htm
>>
>> I will put it another way,at dawn,the Earth axially rotates out of its
>> orbital shadow but if you are the minset of sunrise and sunset you
>> will place great stake in the position of the Sun in the sky and this
>> is exactly where you are at, so is everyone else thanks to Newton.In
>> the early 1920's they jettisoned Newton's geocentric/heliocentric
>> framehopping and resorted to homocentrism which is why the 'every
>> valid point is the center of the universe' is paraded today for the
>> sake of the 'laws of physics'.
>
>Yes, folks, you read it right. Not only is "Oriel36" an
>Einstein-denier, he is also a Newton-denier, as I have verified from his
>postings elsewhere.
>
>Can't we all just *plonk* him?
Agreed a wonderful idea.
--
Ak'toh'di
------------------------------
Date: 19 Aug 2004 10:53:00 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Earthquake forecasting program Aug. 16, 2004
Message-Id: <86657fnhfn.fsf@blue.stonehenge.com>
*** post for FREE via your newsreader at post.newsfeed.com ***
>>>>> "edgrsprj" == edgrsprj <edgrsprj@ix.netcom.com> writes:
edgrsprj> These discussions seem to often start with people talking
edgrsprj> about the subject matter of the original post. Then the
edgrsprj> conversations wander off in other directions. Eventually
edgrsprj> the thread comes to an end. Hopefully that will happen to
edgrsprj> this one fairly soon.
It would have happened much sooner had you not started the thread
in the first place.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
------------------------------
Date: 19 Aug 2004 19:34:10 GMT
From: ctcgag@hotmail.com
Subject: Re: editing perl script through TEXTAREA
Message-Id: <20040819153410.364$zI@newsreader.com>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> Alan J. Flavell wrote:
> > Gunnar Hjalmarsson wrote:
> >> My comment was triggered by other posts in this thread with the
> >> usual, awfully tiresome "CGI.pm takes care of it all" message.
> >
> > This is unworthy of you. The fact that CGI.pm is subject to the
> > same interworking rules as every other CGI software should come as
> > no surprise, and by trying to use it as a weapon to beat down those
> > who recommend the use of CGI.pm, you're more likely to weaken your
> > own argument than to strengthen it. IMHO.
>
> Please wake up, Alan!
>
> Previously in this thread, Xho and gnari discussed a fictitious need
> for a "reverse convertion" of HTML entities, and claimed that CGI.pm
> addresses that non-issue. Is it "unworthy" to react to misinformation?
I refered to conversion of special characters. I really don't
care whether they are html entities or URI encoded entities or the
Crystalline Entity while they are on the other side of the abstraction.
The point is, CGI nearly always will properly encode your text going into
the html form, and properly decode it coming back from a form submission.
If you want to know how it does it, look at how it does it. If it doesn't
do it quite right in some special circumstances, use it as a starting point
for making something that does do it right.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 19 Aug 2004 22:21:18 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: editing perl script through TEXTAREA
Message-Id: <2okgm3FbckpfU1@uni-berlin.de>
ctcgag@hotmail.com wrote:
> Gunnar Hjalmarsson wrote:
>> Previously in this thread, Xho and gnari discussed a fictitious
>> need for a "reverse convertion" of HTML entities, and claimed
>> that CGI.pm addresses that non-issue. Is it "unworthy" to react
>> to misinformation?
>
> I refered to conversion of special characters. I really don't care
> whether they are html entities or URI encoded entities or the
> Crystalline Entity while they are on the other side of the
> abstraction.
So you think it's unnecessary to understand anything about what's
happening behind the scenes when you are dealing with CGI? I for one
disagree on that. Strongly. You'll encounter problems very soon if you
don't have a basic understanding.
> The point is, CGI nearly always will properly encode your text
> going into the html form, and properly decode it coming back from a
> form submission.
You seem to take for granted that CGI.pm is used for generating HTML,
while many (most?) people who deal with CGI choose to not use CGI.pm
for that purpose. They (we) do need to understand when converting
certain characters to HTML entities is necessary and how you do it.
> If you want to know how it does it, look at how it does it.
There are far easier ways to gain a basic knowledge about CGI than
studying the CGI.pm source code, aren't there?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Thu, 19 Aug 2004 22:41:59 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: editing perl script through TEXTAREA
Message-Id: <Pine.LNX.4.61.0408192231330.4886@ppepc56.ph.gla.ac.uk>
On Thu, 19 Aug 2004, Gunnar Hjalmarsson wrote:
> There are far easier ways to gain a basic knowledge about CGI than
> studying the CGI.pm source code, aren't there?
Yes: you wouldn't want to study the source code without the basic
knowledge. But the basic knowledge is only the starting point to
practical expertise in deploying CGI scripts in the hostile light of
a WWW situation.
(I thought we'd agreed to draw a line under this, but anyway...)
While the CGI.pm user is learning the details, CGI.pm is taking care
of the basic blunders that they're likely to make. Whereas those who
insist on hand-knitting their own code (which is commendable enough as
a learning experience) and then making the mistake of actually using
it in production in a WWW environnment, are doomed to producing open
mail relays, web proxies, and heaven knows what else before they get a
proper feeling for web security.
In that sense, those who know *enough* to be able to write their own
code safely have no need of our advice here - but those who need to
ask would be better steered towards peer-reviewed modules such as
CGI.pm unti such time as they're ready to take their own decisions.
I think I'm ready to take my own decisions now, and 9 times out of 10
my decision is to choose CGI.pm. That 1 exception probably causes me
more work than all the other 9 added together.
good night
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 6884
***************************************