[12691] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 100 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 10 05:07:21 1999

Date: Sat, 10 Jul 1999 02: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           Sat, 10 Jul 1999     Volume: 9 Number: 100

Today's topics:
    Re: 3 virtues of a Programmer <gellyfish@gellyfish.com>
    Re: advice on data structures, and more <kelly@pcocd2.intel.com>
    Re: apache webserver question <gellyfish@gellyfish.com>
    Re: array stuff.. (Bart Lateur)
    Re: Assigning args with regular expressions (elephant)
    Re: Assigning args with regular expressions (Andrew Johnson)
    Re: Assocative Arrays <kelly@pcocd2.intel.com>
    Re: Changing case local-specifically (Neko)
    Re: Chatpro 2.5 glitch... Help <gellyfish@gellyfish.com>
    Re: Getting very irregular single 'name' field into fir <stephenb@scribendum.win-uk.net>
    Re: Hacker fouls off All-Star site <church@NOSPAMspinn.net>
    Re: Hacker fouls off All-Star site <uri@sysarch.com>
        help: using eggs in a skillet (was: help: using qmail o (Abigail)
        help: using qmail on NT <ashishkjain@hotpop.com>
    Re: help: using qmail on NT <uri@sysarch.com>
    Re: help: using qmail on NT <swiftkid@bigfoot.com>
    Re: I need to hide the source <gellyfish@gellyfish.com>
    Re: Not Learning Perl <ptimmins@itd.sterling.com>
        Perl Script bound to TCP Port <jonathaa@interchg.ubc.ca>
    Re: please help regex! (Bart Lateur)
    Re: Program for Easy Writing of Perl Code <gellyfish@gellyfish.com>
    Re: Program for Easy Writing of Perl Code <gellyfish@gellyfish.com>
    Re: Random Numbers (Abigail)
    Re: Random Numbers <rra@stanford.edu>
    Re: Random Numbers <gellyfish@gellyfish.com>
    Re: Reading from NT serial port <rpsavage@ozemail.com.au>
    Re: single instance log file (Abigail)
    Re: Using perlcc to compile a perl prog <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 9 Jul 1999 23:21:36 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: 3 virtues of a Programmer
Message-Id: <7m6060$1vo$1@gellyfish.btinternet.com>

On Fri, 9 Jul 1999 11:38:54 -0500 elaine ashton wrote:
>> Simon Twigger wrote:
>> > 
>> > 3. Hubris.
>> 
>> The pink camel, page 424:
> 
> Rats! I gave my pink camel away once while on a layover in BWI upon seeing
> this geek reading a shell programming book.
> 

Weirdly I found a third of a Pink camel on the desk of my colleague - I now
have a handle on where his shortcomings as a Perl programmer come from.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 09 Jul 1999 23:33:30 -0700
From: Michael Kelly - FVC PCD VET ~ <kelly@pcocd2.intel.com>
Subject: Re: advice on data structures, and more
Message-Id: <us2emih8151.fsf@fri2007.fm.intel.com>

lr@hpl.hp.com (Larry Rosler) writes:

> In article <us2lncqmf1o.fsf@fht2007.fm.intel.com> on 09 Jul 1999 
> 00:57:07 -0700, Michael Kelly - FVC PCD VET ~ <kelly@pcocd2.intel.com> 

> > 	while(<>) { #Untested

> I'll say!  Even if it were fixed so it compiled, it might never finish.

	Well it works well for my purpose of sorting parameter data
into a report.  We are testing a couple hundred parameters from
multiple devices, from multiple wafers, at multiple temps, multiple
core vcc's, multiple peripheral vcc's, multiple v-ref's.  And I want
to find the worst case for each parameter.  Then know all of the keys
when I find that worst case.
	I see many people in the same spot as Ross, trying to sort
with indexed lists.  That method just doesn't work.  The hash of a
hash of a hash may not be pretty, or memory efficient.  But it screams
compared to an indexed list.

> > 	...fill the vars, empties are ok, undef them first so there is no
> >         bad data.

> What does 'undef them first' mean?  The hashes will be autovivified, and 
> any 'empties' will automatically be undefined.

	Undef the variables that are to become keys, or know that they
are not holding bogus data from the previous iteration.  Some people
don't import data cleanly.

> > $database{$state}{$zip}{$city}{$address}{$address_2}{$department}
> >          {$institution}{$last_name}{$first_name} = $error_code;
> > 
> > 	};# END of while CLEAN_LIST
> > 	
> > 	What does it do?  You have a 'hash', where there is a 'list'
> > of "states" that are 'keys' in the 'hash'.  Each "state" 'key' points
> > to a list of "zips", that are in turn 'keys' in a 'hash' pointing to a
> > list of "cities", that are 'keys'...and so on.
> > 	So what good is this?  Easy sorting.  And you can reuse those
> > vars, if they are not needed again, else rename the keys comming out.
> > 
> > 	foreach $state (sort keys %database) {
> >        #you get a sorted foreach of the states
> > 		print"state=$state\t"; #I do this for debug
> > 	foreach $zip (sort keys %{$database{$state}}) {
> >        #foreach zip from the current state
> > 		print"zip=$zip\t"; # debug
> > 	foreach $city (sort keys  %{$database{$state}{$zip}}) {
> >        #foreach city from the current state and zip
> > 		print"city=$city\t"; # debug
> > 	yadda...yadda...yadda
> > 	} #END of foreach $city
> > 	} #END of foreach $zip
> > 	} #END of foreach $state

	Oop's you can only pull keys from a hash...Well I said it was untested.

> Ugggh.  O(NlogN * MlogM * LlogL).  Kiss your CPU goodbye!
> 
> Excerpted from the upcoming paper by Uri Gellman and me,
> "A Fresh Look at Efficient Perl Sorting" 
> <URL:http://www.hpl.hp.com/personal/Larry_Rosler/sort/>:
> 
> <QOUTE>
> Multi-subkey sorts
> 
> Often you need to sort records by a primary subkey, then for all the 
> records with the same primary subkey value, you need to sort by a 
> secondary subkey. One horribly inefficient way to do this is to sort 
> first by the primary subkey, then sort all the records with each primary 
> subkey by the secondary subkey. ...
> </QUOTE>
> 
> Perhaps needless to say, there are less 'horribly inefficient' ways to 
> do the proposed sort, and now you know where to find them.



	Oop's I used the wrong lingo, I should have said "structuring
the data", instead of "sorting the data".  I believe Ross is trying to
extract all of the addresses from each zip, for mailing effeciency.  I
on the other hand am trying to sort a tree, to trace a specific
branch.  You've worked long and hard at super efficient sort
algorithms.  But People like Ross and I are just trying to hack out a
quick sort script.

-- 
Not speaking for Intel
Michael Kelly (the one in Folsom)
1900 Prarie City Road	desk (916) 356-2822
Folsom, CA. 95630	Page (916) 360-5847
M/S FM6-114		fax  (916) 356-4561

	"Just say not to a pretty GUI"


------------------------------

Date: 9 Jul 1999 23:00:32 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: apache webserver question
Message-Id: <7m5uug$1v0$1@gellyfish.btinternet.com>

On Fri, 09 Jul 1999 13:54:41 -0500 brian d foy wrote:
> In article <MPG.11effb6991c0c369989b24@news-server>,
> e-lephant@b-igpond.com (elephant) wrote:
> 
>> Gene Dolgin writes ..
>> >Is it possible to setup apache in a way, that when any file from a
>> >specific dir is accessed, the request is forwarded to a perl program?
>> 
>> yes .. but the answer has nothing to do with perl and everything to do 
>> with apache .. a product that comes with copious amounts of documentation 
>> .. read it
> 
> you only think it has nothing to do with Perl.  this sounds like a 
> question about a PerlTransHandler.  this can be answered by taking a
> look at www.modperl.com, which is all about Apache *and* Perl.
> 

It might be worth pointing out that there is a particularly nice example
by Lincoln D. Stein in issue 12 of The Perl Journal - I guess the code
can be found at <http://www.tpj.com> somewhere ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Sat, 10 Jul 1999 06:38:10 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: array stuff..
Message-Id: <3786e9d5.198169@news.skynet.be>

Marshall Culpepper wrote:

>is there any quick function to add a certain string to every element of
>an array
>i.e;
>$str="a";
>@test=('0'..'5');
>and test would return as ('a0'..'a5')?

Try map()

	@test = map { "a$_" } 0 .. 5;

Especially interesting if you want a different array for the
destination, than for the source.

	Bart.


------------------------------

Date: Sat, 10 Jul 1999 17:38:20 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: Assigning args with regular expressions
Message-Id: <MPG.11f1a37628535c3b989b28@news-server>

Ronald J Kimball writes ..
>theoddone33 <anonymous@web.remarq.com> wrote:
>
>> So the $1 $2, etc variables keep their values even outside
>> the regular expression, eh?  Thanks!
>
>The $1 $2 etc variables *only* have their values outside the regular
>expression.  Inside the regular expression, you have to use \1 \2 etc.

I'd like to see the LHS caveat on this statement so that people don't 
think that they should be doing this

  s/(some example)/blah \1/;

ie. $1 $2 $n SHOULD always be used in preference to \1 \2 \n on the RHS 
of a substitute because the RHS is interpolated just like a double-quoted 
string .. and $1 $2 $n are certainly populated by the time the RHS of a 
substitute is executed .. perlre covers why if you're interested

-- 
 jason - remove all hyphens for email reply -


------------------------------

Date: Sat, 10 Jul 1999 07:50:15 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: Assigning args with regular expressions
Message-Id: <XWCh3.77$n5.5601@news1.rdc2.on.home.com>

In article <MPG.11f1a37628535c3b989b28@news-server>,
 elephant <e-lephant@b-igpond.com> wrote:
! Ronald J Kimball writes ..
! >theoddone33 <anonymous@web.remarq.com> wrote:
! >
! >> So the $1 $2, etc variables keep their values even outside
! >> the regular expression, eh?  Thanks!
! >
! >The $1 $2 etc variables *only* have their values outside the regular
! >expression.  Inside the regular expression, you have to use \1 \2 etc.
! 
! I'd like to see the LHS caveat on this statement so that people don't 
! think that they should be doing this
! 
!   s/(some example)/blah \1/;

yes, but he did say 'inside the regular expression', which is correct,
the RHS of s/// is outside of the regular expression.

andrew

-- 
      They're not soaking, they're rusting!
          -- my wife on my dishwashing habits
      


------------------------------

Date: 10 Jul 1999 00:06:54 -0700
From: Michael Kelly - FVC PCD VET ~ <kelly@pcocd2.intel.com>
Subject: Re: Assocative Arrays
Message-Id: <us2d7y17zld.fsf@fri2007.fm.intel.com>


	Why does everyone want to talk trash about my favorite data
structure?  I see people trying to sort from indexed lists, and a
HoHoH... is much better.

-- 
Not speaking for Intel
Michael Kelly (the one in Folsom)
1900 Prarie City Road	desk (916) 356-2822
Folsom, CA. 95630	Page (916) 360-5847
M/S FM6-114		fax  (916) 356-4561

	"Just say not to a pretty GUI"


------------------------------

Date: 10 Jul 1999 07:55:42 GMT
From: tgy@chocobo.org (Neko)
Subject: Re: Changing case local-specifically
Message-Id: <7m6u9u$s6h$0@216.39.141.200>

On Fri, 9 Jul 1999 22:28:14 -0700, lr@hpl.hp.com (Larry Rosler) wrote:

>[Posted and a courtesy copy sent.]
>
>In article <Atyh3.82$xEh.179233792@news.frii.net> on Sat, 10 Jul 1999 
>02:45:52 GMT, Jack Applin <neutron@bamboo.verinet.com> says...
>> 
>> 	use locale;
>> 	$_ = "AeÎö\n";
>> 	s/\w/$& ne uc($&) ? uc($&) : lc($&)/ge;
>> 	print;
>> 
>> I don't like it.  It executes code for each \w character found,
>> which can't be too fast.  I'd like to do one whopping tr for the
>> entire string, but constructing the tr and eval'ing it would be ugly.
>> Any ideas?
>
>How ugly would it be?  Presumably it would be done once, and its costs 
>amortized over many uses.  I'll use your own code to construct the tr.
>
>#!/usr/local/bin/perl -w
>use strict;
>use locale;
>
># Initialization.
>my $left  = join "" => map chr, ord('A') .. 0xFF; # No letters lt 'A'.
>(my $right = $left) =~ s/(.)/$1 ne uc($1) ? uc($1) : lc($1)/ge;
>eval "sub Tr { \$[0] =~ tr/$left/$right/ }";
>$@ and die $@;

Nice.  And a variation using map() instead of s///:

my @left  = map chr, ord('A') .. 0xFF;
my @right = map {$_ ne uc $_ ? uc : lc} @left;
eval "sub TR { \$_[0] =~ tr/@left/@right/ }";
$@ and die $@;

-- 
Neko | tgy@chocobo.org | Will hack Perl for a moogle stuffy! =^.^=


------------------------------

Date: 9 Jul 1999 22:53:22 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Chatpro 2.5 glitch... Help
Message-Id: <7m5uh2$1ur$1@gellyfish.btinternet.com>

On Fri, 9 Jul 1999 11:48:37 -0500 John Curry wrote:
>                                               , actually type out the fix
> and show me where to insert it

<snip 3 squillion lines of code>

Yeah I'll show you were to insert it ...  You'd better get down the shop
and buy some KY if you cant take the pain though .

What exactly was the problem you were having ?

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Sat, 10 Jul 1999 09:53:33 +0100
From: "Stephen Benson" <stephenb@scribendum.win-uk.net>
Subject: Re: Getting very irregular single 'name' field into first/last name for credit card gateway -- what hit rate is possible?
Message-Id: <7m71oj$nc7$1@plutonium.compulink.co.uk>

There's no code yet, 'cos I'm considering the problem, investigating the
data. It just seems more than a quick regexp/split can handle.

Anyway, the way I see it and from the experience of resolving the problems
manually, a project like this could go on for ever, sucking up Crays and
neural networks, slowly getting closer to 100% strike rate. Even doing it
myself manually, I wouldn't get 100%.

I also have a first/last name field entered during registration -- but it's
generally considered less trustworthy than the info entered for credit card
details -- but I could start comparing against that too, but many users
don't take it
as seriously as the card info.

I'd also like to know if anyone recognises the US/Europe distinction
regarding name fields. Seems pretty odd to me.

But transferring the process of analysis into a simple script seems a huge
task.

More generally, I'm sure this has been addressed before; there must be some
discussion of the issues somewhere.


Abigail <abigail@delanet.com> wrote in message
news:slrn7odbmt.h7.abigail@alexandra.delanet.com...
> Stephen Benson (stephenb@scribendum.win-uk.net) wrote on MMCXXXVIII
> September MCMXCIII in <URL:news:7m55tj$agd$1@plutonium.compulink.co.uk>:
>>I have to come up with a perl script that takes a very variable name field
>>and turns it into a coherent first/lastname pair. My feeling is that even
if
>>I can come up with a solution, it can never get it right more that 9.5/10
>>times (verry optimisdic). Even if you don't feel like offering a solution,
>>and opinion on this would be useful.
>>
>>The ecommerce system I'm working with gets a single field for the 'Name as
>>on Credit Card' field, but the credit card gateway (CyberSource) wants
first
>>and last name (which gets used in the scoring process).
>>
>>Apparently, the vendor tells us, this is because US credit card sytems
take
>>two fields, we take one over here in EuroLand.
>>
>>Because the data comes from Britain, France and Germany, there's a wide
>>range of national honorifics and idiosyncrases etc.
>>
>>This is a selection of the fields I have to work with (a bit randomised to
>>protect the innocent):
>>
>>Mr D E M Clitby
>>Mr Jeteth Bhitt
>>COISES DE TERRE
>>Peter R Jollowi
>>MR PJ JUDSOM
>>George  C.  Lin
>>irnold g midget
>>dr. Jeloet M.   Joi
>>IBREJIM EBEY
>>EMMER EBD REBBO
>>EBDUL MOUR
>>E EBDOOL WEJED
>>MOJEMMED EBDULL
>>Birgliygird
>>MS L E EBLEWJIT
>>pitregk ibou
>>TJIERRY EBOUKRE
>>EBREJEM BRUMO
>>MR SULEIMEM EBU
>>E EBULE
>>PJILIPPE ECCERD
>>ECJTE
>>MR MR MEJMED
>>MR. ZULKQER EJM
>>MRS K E EIMSCOU
>>EMTJOMY EIREY
>>Mr Ruttell R Ee
>>EMTJOMY EIREY
>>MR B EITCJISOM
>>J K Elvirez-Sin
>>S R ELVEREZ-MES
>>PIERRE-LOUIS EM
>>Jein-MoEBl Emee
>>EMOKREME
>>MR CJRISTOPJER
>>M J EMOS
>>lugendi imue
>>Mr Rizpil Rt En
>>We Cire Jomet L
>>EMGELE M EGUEM
>>MERK IVEM EGUER
>>birgliyt gonneg
>>S V Ehern
>>Kirl Eherne
>
>
> So, what's your Perl question?
>











------------------------------

Date: Sat, 10 Jul 1999 01:09:47 -0600
From: "DC" <church@NOSPAMspinn.net>
Subject: Re: Hacker fouls off All-Star site
Message-Id: <7m6riu$pva$1@news.gstis.net>

Can someone point me to some sample PERL script or code that will enable me
to write a script of my own to go out to the Web in a similar fashion to
this guy's script?  My purposes are for legal reasons, although I don't
think he broke any laws, did he?

I need a script that will go to certain web sites and fill in some
information each night via forms on their pages.

Thanks!

dc :)

church@spinn.net

Chris Nandor <pudge@pobox.com> wrote in message
news:pudge-0907991202430001@192.168.0.17...
> http://pudge.net/tmp/pudge_on_espn.mp3
>
> --
> Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
> %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])




------------------------------

Date: 10 Jul 1999 03:13:16 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Hacker fouls off All-Star site
Message-Id: <x7908pq8oj.fsf@home.sysarch.com>

>>>>> "D" == DC  <church@NOSPAMspinn.net> writes:

  D> Can someone point me to some sample PERL script or code that will enable me
  D> to write a script of my own to go out to the Web in a similar fashion to
  D> this guy's script?  My purposes are for legal reasons, although I don't
  D> think he broke any laws, did he?

  D> I need a script that will go to certain web sites and fill in some
  D> information each night via forms on their pages.

LWP. it is what chris used. it is what most any decent perl hacker would
use.

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: 10 Jul 1999 03:08:10 -0500
From: abigail@delanet.com (Abigail)
Subject: help: using eggs in a skillet (was: help: using qmail on NT)
Message-Id: <slrn7odvqj.h7.abigail@alexandra.delanet.com>

Ashish Jain (ashishkjain@hotpop.com) wrote on MMCXXXIX September MCMXCIII
in <URL:news:7m7v33$hbq$1@news.vsnl.net.in>:
 .. I am having problems using qmail on NT. Or if there are any altenative.
 .. Please suggest.


I am having problems using eggs in a skillet. Or if there are any altenative.
Please suggest.



Abigail
-- 
perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
          for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
          print chr 0x$& and q
          qq}*excess********}'


  -----------== 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: Sat, 10 Jul 1999 12:21:52 +0530
From: "Ashish Jain" <ashishkjain@hotpop.com>
Subject: help: using qmail on NT
Message-Id: <7m7v33$hbq$1@news.vsnl.net.in>

I am having problems using qmail on NT. Or if there are any altenative.
Please suggest.

Thanks









------------------------------

Date: 10 Jul 1999 03:07:06 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: help: using qmail on NT
Message-Id: <x7emihq8yt.fsf@home.sysarch.com>

>>>>> "AJ" == Ashish Jain <ashishkjain@hotpop.com> writes:

  AJ> I am having problems using qmail on NT. Or if there are any altenative.
  AJ> Please suggest.

i nominate this for the "what is your perl question?" posting of the
month.

any seconds?

this could be a nice little contest as we seem to get plenty of
entrants. i wonder if being a perl hacker makes us look so bright to the
rest of the world, is the reason we get so many OT posts here?

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: Sat, 10 Jul 1999 11:57:44 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: help: using qmail on NT
Message-Id: <7m7u6i$iaa2@news.cyber.net.pk>

Ashish Jain <ashishkjain@hotpop.com> wrote in message
news:7m7v33$hbq$1@news.vsnl.net.in...
> I am having problems using qmail on NT. Or if there are any altenative.
> Please suggest.

That is not a Perl question.

Anyway, you can try sendmail, www.demobuilder.com (not free)





------------------------------

Date: 9 Jul 1999 22:40:52 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: I need to hide the source
Message-Id: <7m5tpk$1ui$1@gellyfish.btinternet.com>

On Fri, 9 Jul 1999 10:22:08 -0700 "Jürgen Exner" wrote:
> Clive Newall <crn@itga.com.au> wrote in message
> news:v5pv22ct3r.fsf@lightning.itga.com.au...
>> "Jürgen Exner" <juex@my-dejanews.com> writes:
>>
>> > Abigail <abigail@delanet.com> wrote in message
>> > news:slrn7o7lb6.ued.abigail@alexandra.delanet.com...
>> > > rdosser@my-deja.com (rdosser@my-deja.com) wrote on MMCXXXVI September
>> > > MCMXCIII in <URL:news:7m09vd$m44$1@nnrp1.deja.com>:
>> > > ``
>> > > `` I should have explained more: I'm trying to conceal a decryption
>> > > `` algorithm for confidential data.
>> > >
>> > > And you don't trust root? Buhahhahhahahhahaa. That's stupid.
>> > > Find a root who you can trust.
>> >
>> > Although I have to aggree that security by obsfucation is not the right
> way
>> > to go, still the administrator of e.g. a hospital network has no
> business
>> > reading my medical records.
>> >
>> > So not trusting root for confidential data is a very valid case.
>>
>> No. You cannot prevent root from breeching your security by technical
>> means. Your *only* hope is to enforce such security by other means.
>> Like hiring a good professional sysadmin.
>> Like ensuring all staff understand your security policies & how they
>> relate to confidential data.
>>
>> If you don't trust root there is only one solution: dismissal.
> 
> I still disagree on both accounts:
> - You can protect you confidential data even from malicious sys-admins by
> good encryption. 
> 

You still have to have a trustworthy sysadmin or DBA or whatever - I worked
for a good few years in the social housing field,  I was the DBA for systems
wherein was stored the housing records of my neighbours, people who I
drank in the Pub with; I have seen the housing benefit records of my
acquaintances.  If I wasnt a responsible professional then *yes* I could
have abused that knowledge, just the same as all the clerks and other
officers that have seen that data, but if you do abuse then you wind up
in the Private Eye sooner or later and never get to play that game again.

I saw the planning application for the development next door to us and being
DBA for *that* database as well I could have fixed it ... Out of principle
and professional ethic I couldnt comment even when asked ..

If you cant trust root or your DBA then you've got a problem, but that
problem isnt anything to do with computers its to do with the culture of
the organization.  

In this kind of situation the old myth wherein you are forever stuck in
the employment of the public sector does have a kernel of truth - anyone
who has worked with that data and has proved trustworthy is a valuable
resource, anyone who isnt trustworthy in that environment will probably
wind up flipping burgers.  

Encryption is pointless if it merely shores up a lack of trust within an
organization.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Sat, 10 Jul 1999 06:55:51 GMT
From: Patrick Timmins <ptimmins@itd.sterling.com>
Subject: Re: Not Learning Perl
Message-Id: <7m6qpl$vnq$1@nnrp1.deja.com>

In article <x7n1x5qff4.fsf@home.sysarch.com>,
  Uri Guttman <uri@sysarch.com> wrote:

[snip]
>
> this was done much better last year. someone posted a long troll which
> hit every hot button this group has. he wanted instant help and didn't
> want to rtfm etc. it should be reposted every so often. it actually
> suckered some of us into thinking the poster was a real nutcase.
> anyone remember the name (or is the author still here?) of the author
> so we could find it on deja?
>
> uri

Ahhh! Fame is fleeting, but people will remember a real jackass. I'm
still here (albeit, under a different email address). You should be able
to find the whole thread at:

http://www.deja.com/[ST_rn=ps]/viewthread.xp?AN=389453285&search=thread&
svcclass=dnserver&ST=PS&CONTEXT=931588211.1081671857&HIT_CONTEXT=9315882
11.1081671857&HIT_NUM=81&recnum=%3c6t6j8i$h$1@nnrp1.dejanews.com%3e%231/
1&group=comp.lang.perl.misc&frpage=getdoc.xp&back=clarinet

This is all one long URL (no carriage returns). If that doesn't work,
the info on particular post in comp.lang.perl.misc:

   Date: 9/09/98
Subject: QUESTIONS (was: Perl Programmer Needed)
 Author: Patrick Timmins
  email: ptimmins@netserv.unmc.edu

Have fun!

$monger{Omaha}[0]
Patrick Timmins
ptimmins@itd.sterling.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: Fri, 09 Jul 1999 23:51:34 -0700
From: "Jonathan Abourbih" <jonathaa@interchg.ubc.ca>
Subject: Perl Script bound to TCP Port
Message-Id: <7m6qhn$hkt$1@nntp.ucs.ubc.ca>

I am trying to write a Perl script on my LinuxPPC R4.1 box that runs
automatically when a user telnets to a specific port. I have set up the
/etc/inetd.conf and /etc/services files correctly, and properly configured
the hosts.allow and hosts.deny files.

My problem is that when someone telnets into this port, they get no response
from my host until the connection is closed. I.e., it seems like all of the
text and prompting that my computer sends is for some reason buffered and
not sent to the remote client. But when the connection is closed, all of the
text in the buffer is sent. This is obviously no good, since this script is
supposed to be interactive. The kicker is that I do NOT get the same
behaviour if I write the program as a bash shell script. Does anyone know
how I can fix Perl? I can live with the shell script implementation, but I
prefer the security features of Perl. Any ideas? Please cc my e-mail address
in your reply. Thanks!
-----------------------------------------------------
Jonathan Abourbih, jonathaa@interchg.ubc.ca
Year 2 Electrical Engineering, University of British Columbia
F.SL.MR.


------------------------------

Date: Sat, 10 Jul 1999 07:27:51 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: please help regex!
Message-Id: <3789f455.2885429@news.skynet.be>

Larry Rosler wrote:

>Bart Lateur and I posted this nine hours ago, according to my newsfeed.  

Ah, the wonders of newsfeed...

>Bart even caught the error in the specification that I overlooked.

I did? Good for me. Although I don't have a clue what it is. Oh, you
mean that "~" character?

	Bart.


------------------------------

Date: 9 Jul 1999 22:46:46 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Program for Easy Writing of Perl Code
Message-Id: <7m5u4m$1uo$1@gellyfish.btinternet.com>

On Fri, 09 Jul 1999 13:04:06 GMT mike cardeiro wrote:
> In article <3785e4bc@cs.colorado.edu>,
>   tchrist@mox.perl.com (Tom Christiansen) wrote:
>>
>> f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.
>>
> 
> 
> ...why?
> 

Looks like the hook line from some cheezy recruitment ad to me ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 9 Jul 1999 22:45:35 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Program for Easy Writing of Perl Code
Message-Id: <7m5u2f$1ul$1@gellyfish.btinternet.com>

On Fri, 09 Jul 1999 14:09:48 -0700 David Cassell wrote:
> 
> Yes, but...  has anyone ported Perl to a dog?  

We had a brainstorm on porting Perl to a Ferrari earlier on if that counts.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 10 Jul 1999 01:08:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Random Numbers
Message-Id: <slrn7odops.h7.abigail@alexandra.delanet.com>

Uri Guttman (uri@sysarch.com) wrote on MMCXXXIX September MCMXCIII in
<URL:news:x7pv21qgf7.fsf@home.sysarch.com>:
$$ >>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
$$ 
$$   >> how would you classify /dev/rand which is based on data in the kernel? i
$$   >> don't know exactly how it creates the numbers, but it is not predictive
$$   >> as it is influenced by random input like kernel interrupts.
$$ 
$$   LR> I would classify it thus:
$$ 
$$   LR> 2.  Something system-specific.
$$ 
$$ true. solaris doesn't seem to have it.

Not just Solaris:

$ ls -l /dev/rand
ls: /dev/rand: No such file or directory
$ uname -a
Linux alexandra 2.0.36 #1 Mon Apr 19 01:58:00 EDT 1999 i686 unknown
$

[ ... ]

$ ls -l /dev/rand
/dev/rand not found
$ uname -a
HP-UX antares B.11.00 E 9000/831 2001616700 8-user license
$

[ ... ]

$ ls -l /dev/rand
ls: /dev/rand: No such file or directory
$ uname -a
OpenBSD ucan 2.2 FOAD#0 i386
$

Although Linux and OpenBSD do have a /dev/random. HP-UX and Solaris don't.

$$   LR> 3.  Sort of like special hardware ('/dev/...' :-).
$$ 
$$ pseudo device, not hardware. :-)
$$ 
$$   LR> 5.  Probably slow itself, if it relies on randomly occurring kernel 
$$   LR> interrupts. 
$$ 
$$ i doubt it. i think that the kernel is always being scanned or random
$$ info in it is being collected. you are supposedly able to read it like
$$ /dev/zero and just slurp random numbers forever. i have to check a linux
$$ box for details.


If I do a 'cat /dev/random' on my machine, it gives a short burst of
weird characters, then it stops, only to react if I touch the keyboard.
Perhaps it's just using intervals between keystrokes? Which would mean
Larry's "special hardware" (not the keyboard, the operator) holds.



Abigail
-- 
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 09 Jul 1999 23:11:19 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Random Numbers
Message-Id: <ylemih5914.fsf@windlord.stanford.edu>

Abigail <abigail@delanet.com> writes:

> If I do a 'cat /dev/random' on my machine, it gives a short burst of
> weird characters, then it stops, only to react if I touch the keyboard.
> Perhaps it's just using intervals between keystrokes? Which would mean
> Larry's "special hardware" (not the keyboard, the operator) holds.

Linux's /dev/random support uses quite a few different things, including
user interrupt timings, to generate the random number pool.  /dev/random
blocks until it has random numbers of a sufficiently high "quality" to
hand out.  If you don't care that much about your random number quality,
you can use /dev/urandom instead, which won't block.

-- 
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print


------------------------------

Date: 9 Jul 1999 23:15:41 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Random Numbers
Message-Id: <7m5vqt$1vl$1@gellyfish.btinternet.com>

On 09 Jul 1999 15:07:54 -0400 Uri Guttman wrote:
>>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
> 
>   LR> In article <378638DB.1C12D9C2@mail.cor.epa.gov> on Fri, 09 Jul 1999 
>   LR> 11:00:59 -0700, David Cassell <cassell@mail.cor.epa.gov> says...
>   LR> ...
>   >> Math::TrulyRandom may not be random anyway, merely chaotic.
>   >> I haven't seen an adequate analysis of it.
> 
>   LR> Hello!  There are no random-number algorithms, by definition.  Special 
>   LR> hardware (such as a radioactive-decay detector) is required.  See Knuth, 
> 
> how would you classify /dev/rand which is based on data in the kernel? i
> don't know exactly how it creates the numbers, but it is not predictive
> as it is influenced by random input like kernel interrupts.
> 

From :


RANDOM(4)           Linux Programmer's Manual           RANDOM(4)

<snip description of /dev stuff>

       The random number generator  gathers  environmental  noise
       from  device  drivers  and  other  sources into an entropy
       pool.  The generator also keeps an estimate of the  number
       of  bit  of  the  noise  in  the  entropy pool.  From this
       entropy pool random numbers are created.

I dunno I no mathmetician ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Sat, 10 Jul 1999 18:15:47 +1000
From: "Pen and Ron Savage" <rpsavage@ozemail.com.au>
Subject: Re: Reading from NT serial port
Message-Id: <8mDh3.1538$1u.13910@ozemail.com.au>

Win32::SerialPort

--
Cheers
ron@savage.net.au
pen@savage.net.au
http://savage.net.au/
George Avison wrote in message <3786b86d.52961680@news.widomaker.com>...
>I'm new to Perl and I'm trying to write a script that will read (into
>an array) a text file that is being dumped across a serial port onto
>an NT 4.0 system.  Can anyone tell me how I tell Perl I want it to
>read from this port rather than from STDIN or a file?  Thanks for any
>help.




------------------------------

Date: 10 Jul 1999 02:00:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: single instance log file
Message-Id: <slrn7odrrq.h7.abigail@alexandra.delanet.com>

Scott Skinner (sskinner@cloud9.net) wrote on MMCXXXIX September MCMXCIII
in <URL:news:sskinner-1007990123190001@sskinner.dialup.cloud9.net>:
!! 
!! Yes, you can spoof a web server, turn off Java, turn off JavaScript, turn
!! off cookies, remove all your fonts, make your font size 72 points, etc.,
!! etc. All of this would hardly take away from the usefulness in determining
!! what HTTP_USER_AGENT the other 99.9 percent of your web audience is using.
!! Still, you've made me curious: what is considered meritorious web coding
!! in this case? Design for the lowest common denominator? One size fits all?

You aren't a Perl Jedi, but you certainly are not a Web Jedi either.
"Design for the lowest common denominator" and "One size fits all"
are strawman argument, only uttered by those who don't understand the web.

People who do, don't design for any specific platform. But don't feel
bad, not everyone reaches enlightment!

!! After all, the lowest common denominator can sink pretty low...

The lowest common denominator might be the browser build in in expensive
German cars, driven by people who have a lot of money to spend.


Followups set.


Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


  -----------== 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: 9 Jul 1999 23:08:24 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Using perlcc to compile a perl prog
Message-Id: <7m5vd8$1v5$1@gellyfish.btinternet.com>

On Fri, 09 Jul 1999 13:57:10 GMT richardwchin@my-deja.com wrote:
> In article <3785e39b@cs.colorado.edu>,
>   tchrist@mox.perl.com (Tom Christiansen) wrote:
>>      [courtesy cc of this posting mailed to cited author]
>>
>> In comp.lang.perl.misc,
>>     richardwchin@my-deja.com writes:
>> :I want to create a single executable rather
>> :than a script that some users might be tempted to edit.
>>
>> "tempted"?  And what's your problem with that?
>>
> His main concern is security and if the compiler makes it less secure
> the whole exercise is pointless.
> 

If the security of your system has been violated already then its already
too late.  Use proper security on your system.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 100
*************************************


home help back first fref pref prev next nref lref last post