[23198] in Perl-Users-Digest
Perl-Users Digest, Issue: 5419 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 24 18:08:14 2003
Date: Sun, 24 Aug 2003 15:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 24 Aug 2003 Volume: 10 Number: 5419
Today's topics:
Re: a backreference problem? <geoff.cox@blueyonder.co.uk>
Re: a backreference problem? <geoff.cox@blueyonder.co.uk>
Re: a backreference problem? <geoff.cox@blueyonder.co.uk>
Re: a backreference problem? (Jay Tilton)
A newbie's question <jdagur@hotmail.com>
Re: A newbie's question <jwillmore@cyberia.com>
Re: A newbie's question <mikeflan@earthlink.net>
Re: buffer overflow <tassilo.parseval@rwth-aachen.de>
Re: buffer overflow <nospam-abuse@ilyaz.org>
Re: buffer overflow <usenet@dwall.fastmail.fm>
Re: buffer overflow <flavell@mail.cern.ch>
DBI data for a cgi pop-up <wpmccormick@hotmail.com>
Re: DBI data for a cgi pop-up <wpmccormick@hotmail.com>
Editing Word documents in Perl (Openoffice Writer or MS (Tony)
how to name an array such that it can include a variabl (Jonas Yorg)
Re: how to name an array such that it can include a var <newsfeed@boog.co.uk>
Re: how to name an array such that it can include a var <bdonlan@users.sf.net>
Re: how to name an array such that it can include a var <usenet@dwall.fastmail.fm>
Re: populating anonymous arrays inside for loop? <mpapec@yahoo.com>
Re: populating anonymous arrays inside for loop? (Tad McClellan)
Re: populating anonymous arrays inside for loop? <matthew.garrish@sympatico.ca>
Re: populating anonymous arrays inside for loop? <mpapec@yahoo.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 24 Aug 2003 16:08:36 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: a backreference problem?
Message-Id: <p6lhkv0uptdrs2r2vss33gqsvk4pfu4b87@4ax.com>
On 24 Aug 2003 12:35:34 GMT, "James E Keenan" <jkeen@concentric.net>
wrote:
James,
Apologies for calling you John!
Geoff
>
>"Geoff Cox" <geoff.cox@blueyonder.co.uk> wrote in message
>news:beugkvoagpkce4ihrp76qimdbsi6onpr61@4ax.com...
>> On Sun, 24 Aug 2003 00:05:44 +0100, "Peter Cooper"
>> <newsfeed@boog.co.uk> wrote:
>>
>> Peter et al ...
>>
>> Now trying this - you will perhaps see better what I am trying to
>> do...problem with the passing of $1 to the sub getintro - I get an
>> uninitialized value in pattern match error ...
>>
>> Cheers
>>
>> Geoff
>>
>> open(IN, "a2-left.htm");
>> open(OUT, ">>out");
>> open(INN, "total");
>>
>> if (open(IN, "a2-left.htm")) {
>
>Why are you asking to do something if and only if the filehandle is open?
>You opened it 3 lines above.
>
>>
>> $line = <IN>;
>>
>> while ($line ne "") {
>
>better for 2 above lines:
>
> while (defined $line = <IN>) {
> next if $line =~ /^$/;
>
>> if ($line =~ /^<a href/) {
>
>Right here it becomes apparent that you're trying to parse HTML -- which
>means you should heed Peter's advice to check out HTML::Parser.
>
>> if ($line =~ /="(.*)\.doc/) {
>> &getintro($1);
>> }
>> }
>> $line = <IN>;
>>
>What's the purpose of the line above?
>
>> }
>> }
>> sub getintro {
>>
>> @intro = <INN>;
>
>You don't appear to do anything with the content of @intro, so why read from
><INN> at all?
>
>> for ($n=0;$n<900;$n++) {
>> if ($into[$n] =~ /$1/) {
>
>... unless, that is, you have a typo in line above and meant $intro
>
>But here $1 contains the result of the first captured expression on the last
>matching line ... which may not always be what you want.
>
>> print OUT ("$into[$n]\n");
>> print OUT ("$line[$n-1]\n");
>> }
>> }
>> }
>>
>> close (IN);
>> close (OUT);
>> close (INN);
>>
>
>Note: The subject of your OP was "backreference problem." But at no point
>in the discussion have you used any backreferences (e.g., \1 as part of a
>pattern match). This leads me to suspect that you just don't understand
>Perl regexes very well. I recommend going to a good Perl text (e.g., the
>llama) and carefully working through the exercises on regexes.
>
>
------------------------------
Date: Sun, 24 Aug 2003 17:10:21 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: a backreference problem?
Message-Id: <pkohkvso3vneld862vm0bqirai97jqo55h@4ax.com>
James,
following code nearly there ... just one major problem ----- I would
like to have the text from the getintro to be in the order in which
the path is obtained from the a2-left.htm file but it is different
here ...From memory I think the problem is that
@intro = <INN>;
is in random order? is there a way round this?
Cheers
Geoff
in the
use strict;
open(IN, "a2-left.htm");
open(OUT, ">>out");
open(INN, "total");
my $line = <IN>;
while ($line ne "") {
if ($line =~ /^<a href/) {
if ($line =~ /="(.*)\.doc/) {
my $found = $1;
&getintro($found);
}
}
$line =<IN>;
}
sub getintro {
my $found;
my $n;
my @intro = <INN>;
for ($n=0;$n<900;$n++) {
if ($intro[$n] =~ /^<a href/) {
if ($intro[$n] =~ /$found/) {
&print;
}
}
}
sub print {
print OUT ("<tr>$intro[$n-1]\n");
print OUT ("$intro[$n]</tr>\n");
}
}
close (IN);
close (OUT);
close (INN);
------------------------------
Date: Sun, 24 Aug 2003 18:33:49 +0100
From: Geoff Cox <geoff.cox@blueyonder.co.uk>
Subject: Re: a backreference problem?
Message-Id: <3hthkvs2kiuuum0n2bsdbj7fb792rr42ok@4ax.com>
On Sun, 24 Aug 2003 09:58:19 -0500, tadmc@augustmail.com (Tad
McClellan) wrote:
Tad,
the code below now does what I want - ie for each path to a Word doc
name in a2-left.htm it finds the same path etc in the file total and
gets the introductory text associated with this doc....
I am sure there are better ways fo doing this...any thoughts? The sub
getintro seems poor..by the way it seems important to open and close
the total file each time the sub getintro is used...
Cheers
Geoff
use strict;
open(IN, "a2-left.htm");
open(OUT, ">>out");
my $line = <IN>;
while ($line ne "") {
if ($line =~ /^<a href/) {
if ($line =~ /href="(.*)\.doc/) {
&getintro($1);
}
}
$line =<IN>;
}
sub getintro {
open (INN, "total");
my $file = $1;
my $n;
my @intro = <INN>;
for ($n=0;$n<900;$n++) {
if ($intro[$n] =~ /$file/i) {
print OUT ("<tr>$intro[$n-1]\n");
print OUT ("$intro[$n]</tr>\n");
}
}
close (INN);
}
close (IN);
close (OUT);
>Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:
>
>
>> &getintro($1);
>
>
>Why are you passing an argument when the subroutine definition
>never makes use of the argument that you passed?
>
>
>> sub getintro {
>
>
> my( $file ) = @_;
>
>
>> my $n;
>>
>> print ("$1\n");
>
>
> print ("$file\n");
>
>
>> if ($intro[$n] =~ /$1/) {
>
>
> if ($intro[$n] =~ /$file/) {
>
>
>> &print;
>
>
> print OUT "$intro[$n]\n"
>
>
>
>[snip TOFU]
------------------------------
Date: Sun, 24 Aug 2003 18:55:34 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: a backreference problem?
Message-Id: <3f48ff72.333801494@news.erols.com>
Please stop top-posting replies. Please trim reply-quoted material to
the minimum necessary to establish context.
Geoff Cox <geoff.cox@blueyonder.co.uk> wrote:
: the code below now does what I want - ie for each path to a Word doc
: name in a2-left.htm it finds the same path etc in the file total and
: gets the introductory text associated with this doc....
Groovy.
: I am sure there are better ways fo doing this...any thoughts? The sub
: getintro seems poor..by the way it seems important to open and close
: the total file each time the sub getintro is used...
Why is that? Is the file named "total" constantly changing?
Since you're slurping the file's entire content anyway, how about
doing it just once at the beginning instead of re-slurping it over and
over again?
: use strict;
:
: open(IN, "a2-left.htm");
: open(OUT, ">>out");
Always check the return value from each open() for success.
: my $line = <IN>;
: while ($line ne "") {
That condition won't be true until the end of file is reached. You
may as well use a "while( <IN> ) { ... }" loop instead of this odd
technique you've chosen.
: if ($line =~ /^<a href/) {
: if ($line =~ /href="(.*)\.doc/) {
Is there a reason those two steps cannot be done in a single match?
: &getintro($1);
Don't use the "&sub()" form of subroutine call unless you know what
its effects are and you need those effects. Prefer the "sub()" form
of call.
: }
: }
: $line =<IN>;
: }
:
: sub getintro {
: open (INN, "total");
: my $file = $1;
Why? You already passed the value of $1 into this sub as an argument.
: my $n;
: my @intro = <INN>;
: for ($n=0;$n<900;$n++) {
Why a hardcoded static limit of 900? Got C Programmer's Disease?
Prefer a for loop using the ".." range operator over a C-style for
loop.
: if ($intro[$n] =~ /$file/i) {
: print OUT ("<tr>$intro[$n-1]\n");
: print OUT ("$intro[$n]</tr>\n");
: }
: }
: close (INN);
: }
:
: close (IN);
: close (OUT);
I would instead write it like this (untested).
#!perl
use warnings;
use strict;
open (INN, "total")
or die "Cannot open 'total' for read: $!";
my @intro = <INN>;
close INN;
open(IN, "a2-left.htm")
or die "Cannot open 'a2-left.htm' for read: $!";
open(OUT, ">>out")
or die "Cannot open 'out' for append: $!";
while( <IN> ) {
getintro($1) if /^<a href="(.*)\.doc/;
}
close (IN);
close (OUT);
sub getintro {
my($file) = @_;
for my $n ( 0 .. 899 ) {
print OUT "<tr>@intro[$n-1, $n]</tr>\n"
if $intro[$n] =~ /$file/i;
}
}
[Snip TOFU again. Please stop doing that.]
------------------------------
Date: Sun, 24 Aug 2003 21:54:53 +0530
From: Jitu <jdagur@hotmail.com>
Subject: A newbie's question
Message-Id: <3F48E6D5.AF151056@hotmail.com>
Hi All,
I have one EventHandler running on a particular port that listens to
some events.
After some time i want to shutdown the EventHandler running on that
port.
I have tried few things but all in vain.
Can anyone tell me how to do it.....
Thanx in advance
------------------------------
Date: Sun, 24 Aug 2003 17:52:16 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: A newbie's question
Message-Id: <20030824135157.0d256de3.jwillmore@cyberia.com>
On Sun, 24 Aug 2003 21:54:53 +0530
Jitu <jdagur@hotmail.com> wrote:
> I have one EventHandler running on a particular port that listens to
> some events.
> After some time i want to shutdown the EventHandler running on that
> port.
> I have tried few things but all in vain.
> Can anyone tell me how to do it.....
EventHandler? is this a module, method, what?
Maybe it's me, but I thinks a little more info is required.
--
Jim
------------------------------
Date: Sun, 24 Aug 2003 19:17:39 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Re: A newbie's question
Message-Id: <3F490FEB.C246CE57@earthlink.net>
Jitu wrote:
> Hi All,
> I have one EventHandler running on a particular port that listens to
> some events.
> After some time i want to shutdown the EventHandler running on that
> port.
> I have tried few things but all in vain.
> Can anyone tell me how to do it.....
>
> Thanx in advance
I've got a friendly suggestion for you. Use a subject that is more
descriptive of your problem than "A newbie's question".
Some of the smartest people on this list won't even see your
post with a subject like the one you picked.
Mike Flannigan
------------------------------
Date: 24 Aug 2003 17:15:25 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: buffer overflow
Message-Id: <biarrd$jm4$1@nets3.rz.RWTH-Aachen.DE>
Also sprach Shane Mosely:
> I have been programming with Perl for a year now and supporting my own
> webserver but with all of MS's security issues I was wondering if someone
> could give me some pointers for testing buffer overflow. How do I go about
> writing such a program to test something like iis, ftp or telnet?
You can't produce buffer-overflows in Perl (at least not in the way they
can happen in C). I'd even say that you are immune against anything even
remotely ressembling overruns.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
------------------------------
Date: Sun, 24 Aug 2003 19:01:09 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: buffer overflow
Message-Id: <bib21l$ano$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.parseval@post.rwth-aachen.de>], who wrote in article <biarrd$jm4$1@nets3.rz.RWTH-Aachen.DE>:
> > I have been programming with Perl for a year now and supporting my own
> > webserver but with all of MS's security issues I was wondering if someone
> > could give me some pointers for testing buffer overflow. How do I go about
> > writing such a program to test something like iis, ftp or telnet?
> You can't produce buffer-overflows in Perl (at least not in the way they
> can happen in C). I'd even say that you are immune against anything even
> remotely ressembling overruns.
This is a very bold statement...
A lot of effort went into avoiding overflows; but perl being written
in C, there is no guaranty against bugs.
Yours,
Ilya
------------------------------
Date: Sun, 24 Aug 2003 20:11:30 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: buffer overflow
Message-Id: <Xns93E1A4B522EC0dkwwashere@216.168.3.30>
"Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote:
> Also sprach Shane Mosely:
>
>> I have been programming with Perl for a year now and supporting my own
>> webserver but with all of MS's security issues I was wondering if someone
>> could give me some pointers for testing buffer overflow. How do I go about
>> writing such a program to test something like iis, ftp or telnet?
>
> You can't produce buffer-overflows in Perl (at least not in the way they
> can happen in C). I'd even say that you are immune against anything even
> remotely ressembling overruns.
In the case of CGI programs, I still don't want them using more memory than
they have to, so I use $CGI::POST_MAX and $CGI::DISABLE_UPLOADS from CGI.pm
when applicable. (Although probably not as often as I should.)
------------------------------
Date: Sun, 24 Aug 2003 22:26:50 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: buffer overflow
Message-Id: <Pine.LNX.4.53.0308242215150.6586@lxplus089.cern.ch>
On Sun, Aug 24, David K. Wall inscribed on the eternal scroll:
> "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de> wrote:
>
> > You can't produce buffer-overflows in Perl (at least not in the way they
> > can happen in C). I'd even say that you are immune against anything even
> > remotely ressembling overruns.
>
> In the case of CGI programs, I still don't want them using more memory than
> they have to, so I use $CGI::POST_MAX and $CGI::DISABLE_UPLOADS from CGI.pm
> when applicable. (Although probably not as often as I should.)
Yes, but you're not comparing like with like. A "buffer overrun" in a
badly designed C program could result in a catastrophic failure if a
buffer of 80 bytes had been assigned and, say, 83 bytes of data
written to it. It's a matter of principle, not of scale. Or, for
that matter, writing 10 bytes to an 8 byte buffer...
You're worrying more about exhaustion of resources than about a
"buffer overrun" in the literal sense, it appears.
I think the point is that Perl has been developed in such a way that
actions by the Perl programmer will not produce buffer overrun
situations. The fact that there might be bugs in the Perl code which
deals with that, is a problem of a quite different nature, IMHO. But
neither of them are about running-out of available resources, which
appears to be your immediate concern in referring to POST_MAX.
------------------------------
Date: Sun, 24 Aug 2003 15:51:46 -0500
From: "Bill McCormick" <wpmccormick@hotmail.com>
Subject: DBI data for a cgi pop-up
Message-Id: <bib875$9cg$1@sun-news.laserlink.net>
Hi all,
I'm looking for the wiz bang way to fetch id=name values from a data base
ready to use for a call to the CGI.pm popup_menu command.
Of course I could do this programatcily. But since I exhibit a certain
amount of laziness, I'd like to know how to do this in as few steps as
posible.
Currently, I'm trying
my $array_ref = $dbh->selectcol_arrayref(qq/
SELECT id, name
FROM foo
ORDER BY name/,
{Columns=>[1,2]});
and then
$q->popup_menu(-name=>'selection',-values=>\@values,-labels=>\%labels);
where %labels = @$array_ref # that was easy enough
but then ... I'm stuck ...
@values = ????? # what
Am I missing the plainly obvious here? Is there maybe another DBI call that
would make this all happen in one fell swoop?
Thanks,
Bill
------------------------------
Date: Sun, 24 Aug 2003 16:14:13 -0500
From: "Bill McCormick" <wpmccormick@hotmail.com>
Subject: Re: DBI data for a cgi pop-up
Message-Id: <bib9h8$acl$1@sun-news.laserlink.net>
> but then ... I'm stuck ...
>
> @values = ????? # what
>
Well ... I guess I could do this :
my @values = sort {$labels{$a} cmp $labels{$b}} keys %labels;
But is there a better way? There's always another way!!!
Bill
------------------------------
Date: 24 Aug 2003 13:21:28 -0700
From: hawkmoon1972@hotmail.com (Tony)
Subject: Editing Word documents in Perl (Openoffice Writer or MS Word)
Message-Id: <c90e5468.0308241221.1c901c97@posting.google.com>
Hello,
I want to read and edit openoffice / staroffice writer documents. Does
anyone know of any modules for that?
Ideally, I would've liked a module for editing MS Word documents, but
win32::ole requires Windows, and I'm running Linux. I wish there were
something like Spreadsheet::WriteExcel for MS Word!
Thanks in advance,
Tony
------------------------------
Date: 24 Aug 2003 08:48:53 -0700
From: snikt@cyberspace.org (Jonas Yorg)
Subject: how to name an array such that it can include a variable (for incrementing)
Message-Id: <c568c5cc.0308240748.2d298cba@posting.google.com>
Hi, I am looping through a file and cutting chunks of it out each to
their own new array for later parsing. I want to have the arrays
names like
@array1
@array2
@array3
etc
so I had a type of counter var $n which I wanted to use like
@array$n = ();
and then $n++; when I am done with that section of data
but that doesn't seem to work...can anyone give me a hint on how I can
make these sort of incrementing arrays?
thanks
Jonas
------------------------------
Date: Sun, 24 Aug 2003 17:11:13 +0100
From: "Peter Cooper" <newsfeed@boog.co.uk>
Subject: Re: how to name an array such that it can include a variable (for incrementing)
Message-Id: <biao4q$7a22s$2@ID-194358.news.uni-berlin.de>
Jonas wrote:
> <snip>
> can anyone give me a hint on how I can make these sort of
> incrementing arrays?
Hi Jonas,
You can create 'arrays within arrays'. These are often called 'two
dimensional' arrays. Try this code and see if it makes sense:
my @bigarray;
foreach my $index (0..9) {
$bigarray[$index][0] = "test";
$bigarray[$index][1] = "blah";
$bigarray[$index][2] = "and so on";
}
# Access array 7, element 1
print $bigarray[7][1];
You can extrapolate the 'internal' arrays, by using, say, $bigarray[7] as an
/array reference/, like so:
# Loop all inner elements of array 7
foreach $data (@{$bigarray[7]}) {
print $data;
}
Cheers,
Pete
------------------------------
Date: Sun, 24 Aug 2003 13:33:38 -0400
From: bd <bdonlan@users.sf.net>
Subject: Re: how to name an array such that it can include a variable (for incrementing)
Message-Id: <ig9n11-c4t.ln1@bd-home-comp.no-ip.org>
Jonas Yorg wrote:
> Hi, I am looping through a file and cutting chunks of it out each to
> their own new array for later parsing. I want to have the arrays
> names like
> @array1
> @array2
> @array3
> etc
>
> so I had a type of counter var $n which I wanted to use like
>
> @array$n = ();
>
> and then $n++; when I am done with that section of data
>
> but that doesn't seem to work...can anyone give me a hint on how I can
> make these sort of incrementing arrays?
You can do
@{"array$n"} = ();
But you shouldn't. Use references instead:
$arrays[$n] = [];
See perldoc perlreftut for more info
--
Freenet distribution not available
Consultant, n.:
Someone who'd rather climb a tree and tell a lie than stand on
the ground and tell the truth.
------------------------------
Date: Sun, 24 Aug 2003 20:16:21 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: how to name an array such that it can include a variable (for incrementing)
Message-Id: <Xns93E1A58775ECDdkwwashere@216.168.3.30>
snikt@cyberspace.org (Jonas Yorg) wrote:
> so I had a type of counter var $n which I wanted to use like
>
> @array$n = ();
>
> and then $n++; when I am done with that section of data
Others have pointed out other ways to do this properly instead of using
symbolic references; here's some info on *why* you shouldn't use symbolic
references: http://perl.plover.com/varvarname.html
------------------------------
Date: Sun, 24 Aug 2003 19:28:11 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: populating anonymous arrays inside for loop?
Message-Id: <jqshkvoi468kv92p475q6t7ie9r3ncj8ek@4ax.com>
X-Ftn-To: Eric J. Roode
"Eric J. Roode" <REMOVEsdnCAPS@comcast.net> wrote:
>Matija Papec <mpapec@yahoo.com> wrote in
>news:368ljv8ku5ah1gb9m5mujtk7a8id5mkc9u@4ax.com:
>
>>
>> Symbolic references are deprecated for a number of reasons and you'll be
>
>Deprecated? This is news to me....
I use "deprecated" as another term for "bad thing"(english isn't my first
language). So, if "deprecation" refers to official stand(like for pseudo
hashes), how to call bad programming practices? :)
--
Matija
------------------------------
Date: Sun, 24 Aug 2003 13:16:34 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: populating anonymous arrays inside for loop?
Message-Id: <slrnbki082.d73.tadmc@magna.augustmail.com>
Matija Papec <mpapec@yahoo.com> wrote:
> "Eric J. Roode" <REMOVEsdnCAPS@comcast.net> wrote:
>>Matija Papec <mpapec@yahoo.com> wrote in
>>news:368ljv8ku5ah1gb9m5mujtk7a8id5mkc9u@4ax.com:
>>
>>>
>>> Symbolic references are deprecated for a number of reasons and you'll be
>>
>>Deprecated? This is news to me....
>
> I use "deprecated" as another term for "bad thing"(english isn't my first
> language). So, if "deprecation" refers to official stand(like for pseudo
> hashes),
"deprecated" means roughly:
This feature works, but you shouldn't use it, we may make it
go away someday. You have been warned.
symrefs are not going away, so "deprecated" is not the right term.
> how to call bad programming practices? :)
Symbolic references are bad for a number of reasons
or
Symbolic references should not be used for a number of reasons
:-)
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 24 Aug 2003 15:47:52 -0400
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: populating anonymous arrays inside for loop?
Message-Id: <XD82b.338$O05.51832@news20.bellglobal.com>
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnbki082.d73.tadmc@magna.augustmail.com...
>
> "deprecated" means roughly:
>
> This feature works, but you shouldn't use it, we may make it
> go away someday. You have been warned.
>
> symrefs are not going away, so "deprecated" is not the right term.
>
Just to nitpick a little, deprecation does not automatically imply that a
feature works. From a markup language perspective your definition is sound,
but not so from a programming. In a programming context, the term generally
means that a feature *should* work if you have no other choice (and you read
up on the pitfalls), but something better is coming along, already in place
or it's just going to be dropped entirely (i.e., if you are forced to use an
old version of Perl that only has feature x use feature x, otherwise its use
is deprecated in favour of replacement y because you can't always count on x
to behave correctly).
Matt
------------------------------
Date: Sun, 24 Aug 2003 22:48:08 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: populating anonymous arrays inside for loop?
Message-Id: <649ikvgf9df06qlh26vnfv6aqjkgij5npa@4ax.com>
X-Ftn-To: Tad McClellan
tadmc@augustmail.com (Tad McClellan) wrote:
>"deprecated" means roughly:
>
> This feature works, but you shouldn't use it, we may make it
> go away someday. You have been warned.
>
>symrefs are not going away, so "deprecated" is not the right term.
>
>> how to call bad programming practices? :)
>
>
> Symbolic references are bad for a number of reasons
>or
> Symbolic references should not be used for a number of reasons
>
>:-)
I'll try to remember that. ;)
--
Matija
------------------------------
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 5419
***************************************