[13067] in Perl-Users-Digest
Perl-Users Digest, Issue: 477 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 12 05:07:17 1999
Date: Thu, 12 Aug 1999 02:05:12 -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, 12 Aug 1999 Volume: 9 Number: 477
Today's topics:
Re: 'use strict' - what will I lose if I forgo the prag (Larry Rosler)
A good tutorial PERL <melero@ctv.es>
Re: A good tutorial PERL <arkadyz@ecitele.com>
call a perl script in another perl script <m.scheferhoff@gmx.de>
Re: call a perl script in another perl script <rootbeer@redcat.com>
Re: Dereferencing anon hash (Larry Rosler)
Re: Dereferencing anon hash (Abigail)
dot is too precious to be only for string concatenation <johnlin@chttl.com.tw>
Re: dot is too precious to be only for string concatena (brian d foy)
Fastest form of an 'if' <andrewf@beausys.freeserve.co.uk>
Re: Improving speed of a sub (brian d foy)
Re: is our reese the author of mysql book? (Abigail)
Re: is our reese the author of mysql book? (Abigail)
Re: is our reese the author of mysql book? <tchrist@mox.perl.com>
Re: Menu Options (brian d foy)
Re: Multi-Page Forms (brian d foy)
Re: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!??????????? <schmickl@magnet.at>
Re: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!??????????? <schmickl@magnet.at>
Perl & Security <seccoza@mweb.co.za>
Re: Perl & Security <rootbeer@redcat.com>
Re: PLEASE HELP: system call to another perl program... <GOAWAYSPAMBASTARDSmartin3@dds.nl>
Re: Question Exchange? (brian d foy)
Re: Question Exchange? <uri@sysarch.com>
Reading from <DATA> more than once <jason.holland@dial.pipex.com>
Re: Regexp newbie <uri@sysarch.com>
Re: require mylib.pl (Anno Siegel)
Re: Reset .. ie clear out a hash array (brian d foy)
Re: Reset .. ie clear out a hash array (Larry Rosler)
Re: Reset .. ie clear out a hash array (Abigail)
Re: Some help needed (brian d foy)
Re: Why use Perl when we've got Python?! <I.Clarke@strs.co.uk>
Re: Why use Perl when we've got Python?! <I.Clarke@strs.co.uk>
Re: Why use Perl when we've got Python?! <I.Clarke@NOSPAM.strs.co.uk>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 12 Aug 1999 00:52:33 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: 'use strict' - what will I lose if I forgo the pragma?
Message-Id: <MPG.121c1d1b4056dd0b989e46@nntp.hpl.hp.com>
In article <7otbgs$873$1@rguxd.viasystems.com> on 12 Aug 1999 02:28:44
GMT, lt lindley <ltl@rgsun40.viasystems.com> says...
<SNIP of insightful post, until the last sentence>
...
> Also, "perldoc script" for how to adjust the restrictions to
> suit your needs.
I think your brain slipped here. You meant to say `perldoc strict`.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 12 Aug 1999 09:37:01 +0200
From: "MELERO" <melero@ctv.es>
Subject: A good tutorial PERL
Message-Id: <7ottkv$haq$1@diana.bcn.ttd.net>
HI
I ned a good tutorial for PERL , I have found some tutorial but it's very
bad.
Can You help me?
thanks
------------------------------
Date: Thu, 12 Aug 1999 00:05:59 -0800
From: Arkady Zilberberg <arkadyz@ecitele.com>
Subject: Re: A good tutorial PERL
Message-Id: <934445163.24122@www.remarq.com>
Speaking only for myself:
I found Sam's "Teach yourself Perl 5 in 21 day" very
helpful. When I started reading it I already had some
good experience with awk but not a slightest idea about
Perl. In a mere 2 weeks or so I was ready to write some
quite complicated programs and able to understand most
of other people's code. Creating and using packages is
still beyond my ability (well, I have no need for it yet)
but for starters this book is very good.
You can find online version of this book on
http://www.mcp.com (subscribe to their personal bookshelf
first - it's free).
Good luck,
Arkady.
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Thu, 12 Aug 1999 09:14:48 +0200
From: Michael Scheferhoff <m.scheferhoff@gmx.de>
Subject: call a perl script in another perl script
Message-Id: <37B27468.21FFF925@gmx.de>
Hello,
I'm quite new to perl and have a problem. I try to call a perl script
out of another perl script. I tried to use system, but that does not
work.
Thanks,
Mischa
------------------------------
Date: Thu, 12 Aug 1999 00:57:31 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: call a perl script in another perl script
Message-Id: <Pine.GSO.4.10.9908120051480.7774-100000@user2.teleport.com>
On Thu, 12 Aug 1999, Michael Scheferhoff wrote:
> I try to call a perl script out of another perl script. I tried to use
> system, but that does not work.
Well, that's because you did it wrong. I'd probably be able to tell you
what you did wrong, if I could see your code. Try cutting it down to the
smallest example which shows the problem you're having; fewer than a dozen
lines should suffice.
I have a hunch, though, that you're trying to run a CGI program directly.
That's not simple, if you're going to do it right. It's often easier to
either incorporate code from the other program directly into yours, or to
fetch a page from a webserver.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 12 Aug 1999 00:45:46 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Dereferencing anon hash
Message-Id: <MPG.121c1b83df6023a6989e45@nntp.hpl.hp.com>
In article <x7pv0t7bbk.fsf@home.sysarch.com> on 12 Aug 1999 02:38:39 -
0400, Uri Guttman <uri@sysarch.com> says...
>
> ... DON'T QUOTE THE ENTIRE PREVIOUS POST!!!!
>
> ... DELETE THE REST. and INTERSPERSE YOUR
> COMMENTS WITH THE QUOTED TEXT.
Well, one good thing has come of this fiasco. Uri has located the shift
key on his keyboard, and can even mix cases on the same line.
Who said there was no possibility of progress?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 12 Aug 1999 03:07:14 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Dereferencing anon hash
Message-Id: <slrn7r5050.d88.abigail@alexandra.delanet.com>
Donovan Rebbechi (elflord@news.newsguy.com) wrote on MMCLXXII September
MCMXCIII in <URL:news:slrn7r44qb.mst.elflord@panix3.panix.com>:
() On Wed, 11 Aug 1999 14:36:38 -0600, Josh Goodman wrote:
()
() > #Creating anon hash
() > $database{$_} = {
() > $i => $abs_digits
() > };
()
() This does *NOT* create an anonymous hash, and it doesn't create a
() hashref. It creates %database which is a hash. $database doesn't exist.
Huh? The value of $database {$_} most certainly is an anon hash.
()
() >my $test;
() >#Derefencing one specific database entry by hand for testing purposes.
() >$test = %{$database{"crd.9.m0"}} ->{"1"};
()
() * Your left hand side is a scalar, but the RHS starts with %
() ( so it's a hash )
Is it? It looks to be some kind of deferencing is following that.
And in fact, Perl seems to allow "%hash -> {key}" as an alternative
for $hash {key}. So, %{$database {"crd.9.m0"}} -> {"1"} is really
a funky way of writing $database {"crd.9.m0"} -> {1}.
() * %{hash_name}->{"1"} doesn't make sense. You'd want
() ${hash_ref}->{"1"}
No. You either want $hash_ref -> {1} *or* ${hash_ref} {1}.
()
() * The thing inside the curly braces, $database{$key} should
() be a hashref ( but isn't )
Well, no, $database {$key} is a hash ref. Don't forget the program
ran under -w, and Josh didn't report any other warnings. While odd,
%{$database {"crd.9.m0"}} -> {"1"} *is* correct.
It's very likely the data is different than Jason expects it is,
or there's something going on with the parsing of the data.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 12 Aug 1999 16:24:20 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: dot is too precious to be only for string concatenation
Message-Id: <7ou09n$rs3@netnews.hinet.net>
Dear all,
I am not a perl hacker, but I am a perl lover.
Thank to Perl's auto-growing feature, we can write such codes:
$matrix[100][200]=300;
$john->{name}='John Smith';
$john->{invest}{stock}{'IBM'}{holding}=100;
$john->{invest}{stock}{$stockname}{expense} +=1000;
$joe->{friends}=[$mary,$tom,$john];
$johnsmith=$joe->{friends}[2]->{name};
@{$john->{scores}}{'math','chemistry','biology'}=(100,90,89);
Hey, why don't we denote them as
$john.name='John Smith';
$john.invest.stock.'IBM'.holding=100;
$john.invest.stock.$stockname.expense +=1000;
$joe.friends=[$mary,$tom,$john];
$johnsmith=$joe.friends[2].name;
$john.scores.('math','chemistry','biology')=(100,90,89);
Why not? Because dot '.' is used as string concate operator.
My proposal is
1. invent another operator for string cancate, say 'cat':
$concated=$string1.$string2;
becomes
$concated=$string1 cat $string2;
2. create a new compiler directive
which reserves '.' for hash reference. For example:
use dot; # compiler directive
$john.name='John' cat ' Smith'; # then we can use dot
Actually I hope $john.name can be the default mode
and $john->{name} is only for backward compatibility
so we don't need to bother, and can use it natually.
I also hope the associativity and precedence for this 'dot'
operator can be convenient. Such that in
$count.$word++; # associative array, like %count{$word}++;
we don't need to parenthesize
($count.$word)++;
and
@stocknames=keys %$john.invest.stock;
we don't need to parenthesize
@stocknames=keys %{$john.invest.stock};
I think the internal data structure should be
transparent to users. That is, people just use $john.name,
without having to know anything about hash reference.
Thus, Perl can reserve the possibility to use other
data structure internally.
Another issue is 'attributes and methods will look alike'.
For example:
$pool.('length','width','depth')=(50,10,1.8);
print $pool.volume;
I think it might be good that users don't care whether
$pool.volume comes from a stored value or a computed result.
Many OO tools have this feature, such as Delphi, VB, and COM.
In the latter case, 'volume' can be a sub in
a blessing package, or a function closure:
$pool.volume=sub { $_[0].length*$_[0].width*$_[0].depth };
then we don't even need a package at all.
Oh, I really hope Perl programs look like that.
What do you think about it?
John Lin
------------------------------
Date: Thu, 12 Aug 1999 04:59:40 -0400
From: brian@pm.org (brian d foy)
Subject: Re: dot is too precious to be only for string concatenation
Message-Id: <brian-ya02408000R1208990459400001@news.panix.com>
In article <7ou09n$rs3@netnews.hinet.net>, "John Lin" <johnlin@chttl.com.tw> posted:
> Hey, why don't we denote them as
>
> $john.name='John Smith';
> Why not? Because dot '.' is used as string concate operator.
let's consider the key "file.dat". now i can say
$hash(file.dat}
and get that value. your system doesn't allow that. the syntax would
be
$hash.file.dat
but does that mean
$hash{file.dat} or $hash{file}{dat}
? how are you going to account for functionality like
$hash{ lc $key }
$hash{ "$word1 $word2" }
$hash{ "\n" }
$hash{ $hash2{ $key } }
and so forth?
your method is inflexible and ambiguous. it doesn't hide the details
like you say it does - it just changes the characters that you type.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Wed, 11 Aug 1999 21:56:03 +0100
From: Andrew Fry <andrewf@beausys.freeserve.co.uk>
Subject: Fastest form of an 'if'
Message-Id: <gIL3XCAjNes3EwAE@beausys.freeserve.co.uk>
Which of these 3 forms of 'if a then b' is faster ?...
1. if (a) { b; }
2. b if (a);
3. a && b;
... or isnt there enough in it to worry about ?
---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).
------------------------------
Date: Thu, 12 Aug 1999 03:21:15 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Improving speed of a sub
Message-Id: <brian-ya02408000R1208990321150001@news.panix.com>
In article <Pine.LNX.4.10.9908112255390.24975-100000@bajan.pct.edu>, Duncan Hill <dhill@sunbeach.net> posted:
> ObPerl (?) - why is it that whether the file I'm reading in is 80
> bytes or 8K, the scalar method seems to stick at 4 wallclock secs (for
> 10000 iterations)? I can understand why the while takes longer as the
> file size increases, but not why the scalar method doesn't change.
what you might like to do is check out the DProf module. it will tell
you where you are spending your processing time.
you see effects like this when there is one thing that takes a set
amount of time (like opening a file or establishing a database
connection) that isn't going to change and is the bottleneck when
the rest of the code is really fast. it's sort of like a lower
bound about how fast (slow?) you can go.
always remember to profile your code to find out where the slow
parts are before you rush off to optimize. :)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: 12 Aug 1999 02:39:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: is our reese the author of mysql book?
Message-Id: <slrn7r4ugl.d88.abigail@alexandra.delanet.com>
Uri Guttman (uri@sysarch.com) wrote on MMCLXXII September MCMXCIII in
<URL:news:x74si591tw.fsf@home.sysarch.com>:
{} >>>>> "A" == Abigail <abigail@delanet.com> writes:
{}
{} there is no coercion of an aggregate when is is used and it is empty.
{}
{} my @foo ;
{}
{} @bar = @foo ;
{}
{} is fine. @foo is () which is a legitimate list value to assign.
You say @foo = (), but () has never been assigned to @foo. @foo is
uninitialized. Nothing has been assigned to @foo, not even ().
But this example doesn't really matter - it's in the same category
as
my $foo;
my $bar = $foo;
{} what about $foo = [] ; push @$foo, blah?
No problem at all. $foo is given a value, and hence, not uninitialized.
And hence, @$foo isn't either.
{} how can you init that anymore than what my @foo does?
Huh? "$foo = [];" has an assignment operator, "my @foo;" doesn't.
Big difference. In fact, that difference is the entire point!
{} whereas, using a scalar value of undef can work as perl will auto coerce
{} it to '' or 0 as needed. that is an implied corecion that can be wrong
{} if you don't know what youare doing. hence the warnings if you use it as
{} avalue in a calculation (broad meaning of that term).
Well, of course one could argue all variables get a default value. But
even then why is there just one default value for arrays, yet there can
be 2 default values for scalars? Why not say "all scalars will be initialized
as ''"?
But even then, I still want -w to warn me for uninitialized values. I
don't care if a default values has been set. What is important is that
the moment the variable is used *I* haven't assigned a value yet - and
that's a potential problem. Giving variables default values, and allowing
them to be used without a warning under -w makes -w *less* useful. Because
then it will not determine that no value has been set by the programmer.
{} my $foo ;
{} $bar = $foo ;
{}
{} will not warn, nor should it.
Well, I know it doesn't warn. And I'm not claiming it should.
{} but using the undef to mean 0 or '' is a modification of that value which
{} you should conciously do. so you init it to 0 or '' as needed.
"" is a nice idempotent value for concatination. Do you realize that
forcing people to initialize variables can actually *increase* the
number of mistakes?
my $foo;
...
foreach my $fruit (qw /apple pear banana/) {
$foo .= "$fruit "; # Gives a warning, but is ok.
}
my $foo = 0;
...
foreach my $fruit (qw /apple pear banana/) {
$foo .= "$fruit "; # Doesn't give a warning, but it probably wrong.
}
{} well, with lexical warnings you can select the level of warnings you want.
Yeah, but that's in a future version of Perl. Current Perl doesn't have
lexical warnings, and it hasn't had lexical warnings for the past 10+ years.
And we all know what certain people think of changing the language after
so many years.... ;-)
{} A> I think people should use '-w'. I hope that it teaches people to write
{} A> better Perl. But if people do things just to avoid warnings, and don't
{} A> do other, similar things, just because it doesn't give a warning, then
{} A> -w has failed on them.
{}
{} A> Getting your code to run such that no warnings are generated isn't the
{} A> ultimate goal.
{}
{} true but it doesn't hurt.
That is true, but it irks me that Perl isn't consistent in its warnings.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 02:43:27 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: is our reese the author of mysql book?
Message-Id: <slrn7r4uod.d88.abigail@alexandra.delanet.com>
Mark Mielke (markm@nortelnetworks.com) wrote on MMCLXXII September
MCMXCIII in <URL:news:lq1btcdd8e9.fsf@bmers31f.ca.nortel.com>:
// abigail@delanet.com (Abigail) writes:
// > Uri Guttman (uri@sysarch.com) wrote on MMCLXXI September MCMXCIII in
// > <URL:news:x74si69shc.fsf@home.sysarch.com>:
// > Haven't you ever wondered whether that might be a bug, and that Perl
// > actually should issue a warning? This gives a warning:
// > my $foo;
// > my $bar = $foo + 1;
// > but this doesn't:
// > my @foo;
// > my @bar = (@foo, 1);
//
// "undef() + 1" should definately give a warning. "((), 1)" shouldn't.
undef() + 1 should, but for a different reason. ((), 1) is fine with
me too.
But in "my @foo; my @bar = (@foo, 1);", @foo is *uninitialized*. Even if
it has a default value, it's still uninitialized by the programmer.
It should warn.
If scalars would be given default values of 0 (which they are if used
as numbers), "my $foo; my $bar = $foo + 1;" should still give a warning.
Because the programmer didn't assign anything to $foo.
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 12 Aug 1999 02:50:47 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: is our reese the author of mysql book?
Message-Id: <37b28ae7@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
abigail@delanet.com writes:
: my $foo;
: ...
: foreach my $fruit (qw /apple pear banana/) {
: $foo .= "$fruit "; # Gives a warning, but is ok.
: }
Well, it certainly doesn't give a warning in current perls.
Perhaps you're talking about under some proposed change.
--tom
--
Mister Catbert, the company is trying to force me to use a different kind
of computer. You're the human resources directory. what are you doing
to sop this religious persecution?! What every happened to "Diversity"??
The longer you verk here, diverse it gets. next. --Scott Adams, "Dilbert"
------------------------------
Date: Thu, 12 Aug 1999 03:25:02 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Menu Options
Message-Id: <brian-ya02408000R1208990325020001@news.panix.com>
In article <833qx@questionexchange.com>, QuestionExchange <USENET@questionexchange.com> posted:
> $opt = 6;
> if ( $opt<0 || $opt>30 )
> {
> # error handling
> }
> else
> {
> $fname="handler$opt();";
> }
> eval($fname);
why use eval? it seems that a jump table and subroutine references
would be a heck of a lot easier to code and to understand.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 12 Aug 1999 03:31:21 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Multi-Page Forms
Message-Id: <brian-ya02408000R1208990331210001@news.panix.com>
In article <802qx@questionexchange.com>, QuestionExchange <USENET@questionexchange.com> posted:
> Check out these web sites:
> http://www.perl.org
that site will be going away soon. best not to recommend it. i don't
know why anyone would look there for Multi-page forms anyway.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 12 Aug 1999 09:51:44 +0200
From: Thomas Schmickl <schmickl@magnet.at>
Subject: Re: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!?????????????????????????
Message-Id: <37B27D10.F90AA043@magnet.at>
Larry Rosler schrieb:
> [Posted and a courtesy copy mailed.]
>
> David, I share your heritage and your sensitivities. But I don't read
> this as being nonsense. His English is ragged, so maybe there were
> better ways of expressing his views. For example, 'As we all know, this
> should better not have happend.' is an egregious understatement, but it
> is nonetheless true.
>
Thank you. You are right, its been a long time that I have had english in scool,
and to
discuss things like that its not that easy if you do it in a language that is
not your
mother tounge.
>
> Mitteleuropeans in particular are still struggling to deal with their
> collective inherited shame and guilt. I struggle to force myself to
> accept their remorse (but cannot do it for those of them who are older
> than I am). So let's not damage our own psyches by overreacting.
>
You are right, I am a little bit sensible to things like that.
But I think I have to say something when I hear that some people place the
names of others in something like a "killfille". Thats a symbol.
If somebody does think that I am oversensible for this, maybe he should
take a look at colombine highscool.
I will not keep silence when sombody is "PUPLICALLY" threading another
with beeing silenced (Look at the first posting i replyed). This comes from
the belive to be superior. I heard the word KILLFILE later and this
disgusted me. (How can I remove this feature from my mail client?)
I know, this discussion got OFFTOPIC (like almos all discussions go),
but to get it ONTOPIC again:
I am very pleased that in Perl I simpy undef a varaible and do not have
to write "KILL $customer". unfortionatly there is this DESTRUCTOR.
I like CONSTRUCTORS more. Or Populate (in Prl/Tk)
------------------------------
Date: Thu, 12 Aug 1999 09:59:19 +0200
From: Thomas Schmickl <schmickl@magnet.at>
Subject: Re: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!?????????????????????????
Message-Id: <37B27ED7.E5485415@magnet.at>
> Oh, it seems to me that your analogy is backward. The
> equivalent of the 'pranger' is the usenet practice of listening
> to someone and then saying rude, denigrating, and hateful things
> in return.
I hope I didnt do so. But the original first answerer threatened the original
poster
to get killfiled. This was the think I had to say something against.
> Well thank you very much. I happen to be Jewish, with roots
> in Eastern europe and Russia, so I have plenty of deceased
> relatives thanks to those practices. I find it so charming
> when someone throws nonsense like this in my face. Don't
> expect to get replies from me anymore. That's the
> equivalent of being plonked, anyway.
My point was, that in our country there has bean a time where some people
thought they
were better than others. This has nothing to do with your been jewish or
something else
now in 1999 in america. It gives you no better view to those things, just
because of
your religion. (The nazis kill(fil)ed jews, socialists, roma, handicapped ...).
>
> Since I will no longer read or reply to your posts, you
> may take this as my last word in this thread.
I think I can live with that.
ciao, thomas.
------------------------------
Date: Thu, 12 Aug 1999 09:33:20 +0200
From: "Ian Coetzee" <seccoza@mweb.co.za>
Subject: Perl & Security
Message-Id: <37b27914.0@news1.mweb.co.za>
Hi Guys
I've got a little problem :)
I need to design a software package (perl+mySQL) to do a pay per download
system. Which is all good and well but the way I wish to design this system
is that once a person has payed for a particular download he will be givin a
password (Which will stay active for three hours) should his download
bomb/terminate for some reason or the other , he can log into the website ,
give his password and be able to resume / restart downloading the file.
Now assigning the passwords and doing the SQL files is the easy part. But
how do I interface the perl routines with the Linux security specs
(.htaccess) so that after the person has payed hes got access into the
protected area, if he uses his login and password he has access into the
protected area (Whithout the password dialog box popping up) I want the
person to be able to enter his login details as part of a webpage. And
lastly keeping ppl out that have not entered via one of the above
options.... (With Access I mean the ability to download a file, not view any
webpages)
Do you know were I can get help on this subject or any recommended reading ?
Regards
Ian Coetzee
coetzee@useless.co.za
etc.
------------------------------
Date: Thu, 12 Aug 1999 01:30:06 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl & Security
Message-Id: <Pine.GSO.4.10.9908120118100.7774-100000@user2.teleport.com>
On Thu, 12 Aug 1999, Ian Coetzee wrote:
> how do I interface the perl routines with the Linux security specs
> (.htaccess)
I wouldn't call the .htaccess file "Linux security specs". But there are
modules on CPAN which can help you work with those files from Perl. Here's
the first that I found, but there are others; some may be better suited to
your needs than others, of course.
http://www.cpan.org/authors/id/LDS/HTTPD-User-Manage-1.53.readme
http://www.cpan.org/authors/id/LDS/
You'll find other modules in the CPAN Modules list.
http://www.cpan.org/modules/00modlist.long.html
Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 12 Aug 1999 08:34:12 +0100
From: "Martin Wachters" <GOAWAYSPAMBASTARDSmartin3@dds.nl>
Subject: Re: PLEASE HELP: system call to another perl program...
Message-Id: <7ottdv$38r$1@nclient11-gui.server.virgin.net>
>
>Do you flush the output? close the file? Where's the code?
>
Thanks for the help guys!
Closing the file was the thing to do!!!
Sorry about that...
Martin
------------------------------
Date: Thu, 12 Aug 1999 03:35:49 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Question Exchange?
Message-Id: <brian-ya02408000R1208990335490001@news.panix.com>
In article <m1k8r17or3.fsf@halfdome.holdit.com>, merlyn@stonehenge.com (Randal L. Schwartz) posted:
> Uh, who *is* question exchange, and why are they hiding behind a pseudonym?
didn't you read that book on Guerilla marketing? you pretend to answer
posts so that you get your address out there. :)
and how much are you willing to pay for that answer, anyway?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: 12 Aug 1999 03:35:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Question Exchange?
Message-Id: <x7btcd78pd.fsf@home.sysarch.com>
i am ashamed to say, the owner resides in my neck of the woods. he has
personally answered an earlier flame i sent him about his formatting. he
seems to have a stable of cows answering questions. the poster is called
USENET so he is trying to build up a name for his pay per answer
service. we have to figure out how to stop this stupidity from
growing. let him have his site, but grabbing posts from usenet, and
spitting them back with garbled formatting and weak or wrong answers is
sickening.
uri
Registrant:
Hector Gonzalez (QUESTIONEXCHANGE-DOM)
50 Harbor Point blvd. apt 606
boston, MA 02125
US
Domain Name: QUESTIONEXCHANGE.COM
Administrative Contact, Technical Contact, Zone Contact:
gonzalez, hector (HG3151) hgonzalez@MINDSPRING.COM
(617)8257227 (FAX) (617)8257227
Billing Contact:
gonzalez, hector (HG3151) hgonzalez@MINDSPRING.COM
(617)8257227 (FAX) (617)8257227
Record last updated on 29-Jun-99.
Record created on 22-Mar-99.
Database last updated on 11-Aug-99 03:59:39 EDT.
Domain servers in listed order:
S1.OPTIMALPC.NET 209.177.32.195
S2.OPTIMALPC.NET 209.177.32.196
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Thu, 12 Aug 1999 09:48:40 +0100
From: Jason Holland <jason.holland@dial.pipex.com>
Subject: Reading from <DATA> more than once
Message-Id: <37B28A67.78829549@dial.pipex.com>
Hello all,
Just a quick one:
I have a class that uses its own __DATA__ segment containing, say, a
list of patterns. At the moment I have a clumsy routine that reads the
data the first time an object is created, marking the class as
initialised and storing the data in a class global array, or something.
What's the easiest way of re-reading the data segment? I've tried doing
a sysseek() back to file position 0, but that doesn't work. It actually
reads the program text instead of the data.
I'm stumped.
Thanks
jason.holland@dial.pipex.com
------------------------------
Date: 12 Aug 1999 03:08:11 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Regexp newbie
Message-Id: <x7g11p79yc.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> Yes. It's amazing, but true! For only 5 monthly payments of $29.94 (yes,
A> we are cheaper than Python, who charges you the incredible $29.95)
A> you too can be the proud owner of the Perl manual! Starting 6 weeks
A> after receiving the initial you will receive your first pod page!
A> And then every week another pod! And if you don't like the first pod,
A> send it back and we will stop sending you more pods! No questions asked!
A> But you don't want to send back the pod! You will love the pod! The kids
A> will love the pod! The kids will ask you "when is the new pod coming?"!
A> If you don't want your kids to grow pimples and do bad in school, you
A> can give them pods! Be a responsible parent! And parents love the pods
A> too! For the kids, there is much to learn about ``reverse'' and ``chomp'',
A> and for the parents, there are ``Threads'' and ``Regular Expressions''!
A> --
A> This product is Y2K safe.
A> Void where prohibited, except in Wisconsin.
A> Contains small particles; keep away from potted plants.
A> PODs CONTAIN PARTICLES THAT ATTRACT EVERY OTHER PARTICLE IN THE UNIVERSE.
coming to a theater near you, "invasion of the newbie snatchers!"
starring abigail as the one person who isn't given a pod of her own. but
she has no one to trust. surrounding her are pod people who roam around
wearing vapid smiles and who want her to join them. all she has to do is
sleep and when she wakes up, she will be a vb luser like the rest of
them. no more rants about perl's problems, she can just read the sage
words of her new leader, uncle bill. she will become a newbie for
life. no more reading the copious and confusing docs, the only yellow
and gray walls in her life will be created by paint. she can finally
settle down and marry a nice girl like elaine and raise some kids who
will want pc's in the house to play quake on windows 2038.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 12 Aug 1999 08:40:46 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: require mylib.pl
Message-Id: <7ou1ae$q41$1@lublin.zrz.tu-berlin.de>
Larry Rosler <lr@hpl.hp.com> wrote in comp.lang.perl.misc:
>[Posted and a courtesy copy mailed to the answer 'bot'.]
>
>In article <7os4t4$p30$1@lublin.zrz.tu-berlin.de> on 11 Aug 1999
>15:29:40 -0000, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> says...
>> QuestionExchange <USENET@questionexchange.com> wrote, quoting a
>> nicely formatted posting:
>>
>> >> The perl cookbook would lead me to believe that perhaps I
>> >> should learn how to write a module because the notion of
>> >> libraries is quickly becoming obsolete, however, all I want to
>> >> do is store a mass of strings... const.pl: $const_str1 =
>> >> 'this is string1'; $const_str2 = 'this is string2'; 1;
>> >> #// const.pl mytest.pl #!/usr/bin/perl -w require
>> >> 'const.pl'; print "$const_str1\n"; print
>> >> "$const_str2\n"; #// mytest.pl Now, if there is anything that
>>
>> Eeeek.
>>
>> Anno
>
>Well, finally someone besides me has spoken up about this, though
>minimally.
I complained before, but haven't seen any followup.
>I'm sure there's no objection to these answers, except that:
>
>1. They are anonymous, so there's no one to respond to but an apparent
>bot.
Yes. QE aren't interested in dialog. Their postings are advertisement
for their commercial web site. In my opinion it's a sophisticated
form of spam and I don't care for it at all.
Anno
------------------------------
Date: Thu, 12 Aug 1999 03:27:19 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <brian-ya02408000R1208990327190001@news.panix.com>
In article <5Pts3.300$gi1.50707@nsw.nnrp.telstra.net>, mgjv@comdyn.com.au (Martien Verbruggen) posted:
> [nothing original]
> [a signature that is more than 80 characters wide]
perhaps QuestionExchange doesn't know that URLs can be written with
whitespace:
<URL:http://
www.pm.org>
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 12 Aug 1999 00:20:01 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <MPG.121c156ddc7f7f7b989e44@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <828qx@questionexchange.com> on 12 Aug 1999 5:26:50 GMT,
QuestionExchange <USENET@questionexchange.com> says...
<SNIP of unattributed quote of article, in toto except for the first
line and the blank lines.>
>
>
>
At least this answer isn't incorrect.
WHAT THE FUCK ARE YOU TRYING TO DO TO THIS NEWSGROUP?
You are spewing batches of crap here, despite being asked many times to
stop.
The questions are not being sent as requests to the website that you are
trying to promote at our expense, but you are answering them anyhow.
Your answers are inexpert, inexact, sometimes dangerously wrong.
You have improved from unformatted unreadable crap to misformatted
unintelligible crap.
You have responded to our requests for signed articles by providing
occasionally a four-letter name, without any other identification of the
individual involved so that we can know whom we are dealing with and can
open a corrective dialogue.
You are not being killfiled because you are too dangerous to be allowed
to continue unmonitored.
I have run out of patience, but I do not know enough about Usenet
management to know what to do about this blatant abuse.
WILL SOMEONE RID US OF THIS PESTILENCE?
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 12 Aug 1999 03:09:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Reset .. ie clear out a hash array
Message-Id: <slrn7r508v.d88.abigail@alexandra.delanet.com>
QuestionExchange (USENET@questionexchange.com) wrote on MMCLXXII
September MCMXCIII in <URL:news:828qx@questionexchange.com>:
Just quotes. No contribution.
Enough of this!
*ploink*
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
.qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
.qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Thu, 12 Aug 1999 03:28:20 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Some help needed
Message-Id: <brian-ya02408000R1208990328200001@news.panix.com>
In article <835qx@questionexchange.com>, QuestionExchange <USENET@questionexchange.com> posted:
> > I need counter for web pages. It must works without any other
> > programms and
> > providers.
> > (CGI or Perl script).
> > Pls. help me to find it.
> > servber@mail.ru
>
> www.worldwidemart.com/scripts/counter.shtml
ugghhhh... that's the worse advice you could give. Where's CRAP
when you need it?
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Thu, 12 Aug 1999 09:14:39 +0100
From: Ian Clarke <I.Clarke@strs.co.uk>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37B2826F.E7AA8C42@strs.co.uk>
> Since you've found your place in the programming world, why are you
> bothering us?
Well excuse me for wanting to look at other options. Do you plan to
stick with the languages you use for the rest of your life - or is it
better to be familiar with other languages too? How can you choose the
best tool for a job, if you know nothing about other tools?
Ian.
------------------------------
Date: Thu, 12 Aug 1999 09:31:05 +0100
From: Ian Clarke <I.Clarke@strs.co.uk>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37B28649.9C7F0C1E@NOSPAM.strs.co.uk>
> Perl was originally written for a specific purpose. It's goal was to get
> things done quickly and efficiently.
I think you could say that python was written to get things done
quickly, efficiently, and with some hope of readability too.
> Python on the other hand was written to be "tiny, elegant, minimal." I
> am not saying this is bad. It is only different. It gives very good
> insight into OO programming. But that's not what I, personally, want. I
> want something to do the job, quickly and effectively.
I am not so sure that Perl is "quicker" than Python. Sure, it may
require less characters to get the same job done, but (and I admit here
that I have never written any code in Perl) it seems that Python's more
transparent syntax would make it easier to debug, and thus in the long
run, Python may be quicker.
> As far as I can see (and I might be wrong, but this is the impression I
> got), Python was written just for the sake of writing yet another nice,
> elegant OO language, that has a much nicer and easier syntax than C++ or
> even Java. To that extent, Guido has succeeded. But, I believe he should
> have concentrated on more important issues.
I disagree here. There was a need for an interpreted scripting
language, which allowed the development of large scalable software -
Guido felt that Perl did not fit this bill, and I agree. Also, while I
am not sure which came first, Python is hardly the new kid on the block,
it has been around for a while now.
Perl seems to be more of a rebellion against good language design, and
while people claim that this makes it "more efficient" to code in, I
have yet to see the proof - particularly if you include the time it
takes to debug the code.
> > I have been using Python for some time now, I have occasionally looked
> > at perl, but was but off by its seemingly counter-intuative, and
> > over-complicated syntax.
> That is pure FUD. Perl's syntax is very close to C's, which makes it
> much easier to learn. I found Python's use of spaces a bit confusing,
> but I got over it. You should try to do the same with Perl's syntax.
The first thing that hit me with Perl is that different types of
variables require different special characters to identify them, this
reminds me of Atari Basic of the early 80s, and is not a feature we find
in C. Also, I really don't think that C is the model of what the
perfect language looks like!
> If you really want to compare two languages, then you should learn them
> both, and do the comparison yourself. I like the language which is most
> useful to my specific set of applications. Those applications are,
> almost surely, different from yours. So you might prefer a different
> language.
So is your advice to everyone who posts a question to a newsgroup "Go
find out yourself!" or is it just me?
> Also, I could care less which language you are using. But I think you're
> missing quite a lot of fun.
I am glad you could care less, but if someone would only provide me with
some solid reasons for why I might want to use Perl over Python (other
than wishy washy "Perl is more efficient to code in" or "I tried Python
and didn't like it" comments) then I might consider trying Perl.
Ian.
------------------------------
Date: Thu, 12 Aug 1999 09:33:22 +0100
From: Ian Clarke <I.Clarke@NOSPAM.strs.co.uk>
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <37B286D2.A71C3239@NOSPAM.strs.co.uk>
> Ian is obviously more geared towards Python than Perl. That is perfectly
> fine. But, if Ian doesn't like the language, why even bother posting to
> comp.lang.perl.misc? Just because we may be able to list many reasons
> why _WE_ think Perl is better than Python, Ian probably won't agree.
> And, no matter what reasons we give, Ian will still see the language in
> the same way.
That is not entirely true - I do have an open mind. The point is that
as part of work, I may *need* to write Perl code, and I was really
looking for some reasons why this might not be a bad thing... can anyone
give me any?
Ian.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 477
*************************************