[10142] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3735 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 17 00:08:59 1998

Date: Wed, 16 Sep 98 21:00:20 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 16 Sep 1998     Volume: 8 Number: 3735

Today's topics:
    Re: A Better PERL for Mac? (Ronald J Kimball)
    Re: any way to encrypt my script? <tchrist@mox.perl.com>
    Re: Extract email address from user profile? <moorep@ssmb.com.au>
        HELP! SSI error NWS <A.Honeybun@cowan.edu.au>
    Re: how safe is xor encryption ? (Mark-Jason Dominus)
    Re: how safe is xor encryption ? (David Formosa)
    Re: how safe is xor encryption ? (David Formosa)
    Re: how safe is xor encryption ? <mgregory@asc.sps.mot.com>
    Re: how safe is xor encryption ? <eashton@bbnplanet.com>
    Re: how safe is xor encryption ? <eashton@bbnplanet.com>
    Re: how safe is xor encryption ? (Abigail)
    Re: how safe is xor encryption ? (Abigail)
    Re: how safe is xor encryption ? <eashton@bbnplanet.com>
    Re: how safe is xor encryption ? (Abigail)
    Re: milliseconds? (Matthew Bafford)
    Re: milliseconds? (Ronald J Kimball)
    Re: newbie DATE question (Matthew Bafford)
    Re: newbie DATE question (Matthew Bafford)
    Re: Perl & Java - differences and uses <zenin@bawdycaste.org>
        Perl and Twain (Website Construction Company)
        perl development environment <brivera@texascommerce.com>
    Re: Remove files/Dir help (Matthew Bafford)
        Style question re ($k => $v) (Mark-Jason Dominus)
    Re: Style question re ($k => $v) <dgris@rand.dimensional.com>
    Re: Style question re ($k => $v) (Mark-Jason Dominus)
        SybPerl and Images <moorep@ssmb.com.au>
        Tie STDOUT <JayGuerette@pobox.com>
    Re: Un-tainting a variable for the following format (Matthew Bafford)
    Re: Unix Perl server? <moorep@ssmb.com.au>
    Re: Who posts original posts on CLPM? <eashton@bbnplanet.com>
    Re: Who posts original posts on CLPM? (Ronald J Kimball)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 16 Sep 1998 23:35:34 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: A Better PERL for Mac?
Message-Id: <1dfh028.ymxydm2nc1ogN@bay2-213.quincy.ziplink.net>

Mary E Tyler <dejah@DejahsPrivateIce.com> wrote:

> I am currently using MacPERL for my interpreter... is there another one
> out there for the Macintosh? Maybe a better one? One that might actually
> *find* the stray ( or { instead of just telling me that i have 1 more
> OPEN than LEAVE and 66 more saves than restores? oh ak! at this point,
> i'd even pay money for it.

Good idea: Using MacPerl as an interpreter.
Bad idea:  Using MacPerl as an editor.

Perl doesn't even come with an editor on most operating systems.  It was
just tossed into MacPerl as a quick and dirty way to edit your scripts.

I would recommend BBEdit, from BareBones Software, optionally with the
BBEdit Perl plug-ins.

<http://www.barebones.com/>
<http://pobox.com/~bradh/bbedit>

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 17 Sep 1998 02:16:39 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: any way to encrypt my script?
Message-Id: <6tpre7$4du$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, dennis@info4.csie.nctu.edu.tw (GEMINI) writes:
:However, if I don't want to show my source code 
:to the world, what should I do with my script? 

Delete it.

--tom
-- 
Pointers are sharp tools, and like any such tool, used well they can
be delightfully productive, but used badly they can do great damage
(I sunk a wood chisel into my thumb a few days before writing this).
    --Rob Pike


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

Date: Thu, 17 Sep 1998 13:40:24 +1000
From: Peter Moore <moorep@ssmb.com.au>
Subject: Re: Extract email address from user profile?
Message-Id: <360084A8.83938603@ssmb.com.au>

In early versions of Navigator it was available and then removed for privacy
reasons.
What you could do is create a form which sends an email using the correct
enc-type. However, most good browsers will warn the user that a form is using
email to send off the results.
There are ways around this but generally it involves using a different version
of the above method.
You will get loads of abuse if you do this though!!
regards
peter
--
Peter Moore
Project Manager, Internet Technology
Salomon Smith Barney Australia Securities
http://www.ssmb.com.au/
*******************************************
Loved                                     *
http://www.loved.com/                     *
*******************************************
Bill Krahmer wrote:

> Hello, I was wondering if there is a way using Perl or some kind of
> CGI to extract information like an email address from a Netscape or IE
> user profile.  Thank you.
>          Kind Regards,
>          Bill Krahmer, ElectraSoft
>
>  Get newest version of [FaxMail for Windows], [FaxMail Network for Windows]
>  or [32bit Fax], free trial: http://www.ElectraSoft.com/
>  To read what users are saying about ElectraSoft's fax software, go to
>  http://www.ElectraSoft.com/10GoodReasons/







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

Date: Thu, 17 Sep 1998 11:36:41 +0800
From: Alastair Honeybun <A.Honeybun@cowan.edu.au>
Subject: HELP! SSI error NWS
Message-Id: <360083C8.9E8ABE44@cowan.edu.au>

Hi

Can anyone help please

Using SSI with Novell Web Server I get this error:

[r+; variable '#INCLUDE' recursive includes limited to 5]

When I use this command in an SSI file

<!--#INCLUDE FILE="head.htm"-->


Please advise the solution to : A.Honeybun@cowan.edu.au

Thanks



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

Date: 16 Sep 1998 21:58:46 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tpqcm$8g9$1@monet.op.net>

In article <3600635B.6CA8@DejahsPrivateIce.com>,
Mary E Tyler  <dejah@DejahsPrivateIce.com> wrote:
>> }If the key is truly random, an xor-based one-time pad is perfectly
>okay, so how random is random enough? 

The users, as a group, must constitute an ergodic source of
information with an entropy of at least 53.15 bits per key.

>this is an actual question.

That is the actual answer.

Hope this helps.



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

Date: 17 Sep 1998 11:58:06 +1000
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tpqbe$m64$1@godzilla.zeta.org.au>

In <36000D6B.6B4F@DejahsPrivateIce.com> Mary E Tyler <dejah@DejahsPrivateIce.com> writes:

[...]

>the first 4 refer to the clearing house(for lack of a better term). the
>second four refer to your bank. the third four are a reference internal
>to your bank. the fourth are your account number. or so i have been
>told.

So the first 12 digits are basicly known planetext.

>it's really the last 8 that are important and the last 4 that are
>crucial. 

>think what i might do is take the password they provide and use it as a
>seed to your random number generator and encrypt with the number
>produced... then you can easily reproduce the decryption key (unless i
>misunderstand how RNGs work).

Then the system is crackable.  If you know enough of the output of a PRNG
you can guess the rest.  For the simple random number generators supplied
with your typical compiler (perl just links into C's one) this is 
embrassingly short.

So an attacker could in most likely hoods larnch an attack against this 
system.  In addtion xor encrytion of this stlye to be secure needs a
real random number generator.  You need something like /dev/random for
it to work correctly.  Noraml random number systems just don't cut it.



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

Date: 17 Sep 1998 12:05:41 +1000
From: dformosa@zeta.org.au (David Formosa)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tpqpl$mvl$1@godzilla.zeta.org.au>

In <6tp5ds$jap$1@client3.news.psi.net> abigail@fnx.com (Abigail) writes:

>Mark-Jason Dominus (mjd@op.net) wrote on MDCCCXLII September MCMXCIII in
><URL: news:6touoo$5j0$1@monet.op.net>:
>++ 
>++ I still think `xor' is probably a poor choice.

> In fact,
>  constructing an unbreakable cipher is easy. First choose a random bit
>  string as the key. Then convert the plaintext into a bit string, for
>  example by using its ASCII representation.

However xor is crititily dependent of the quality of the randomness that
it is provided with.  In other words xor is only as strong as your random
number generator.

In addtion if that key is reused (as a number of peaple in the former USSR) 
did the systems securaty becomes easyly broken.



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

Date: 17 Sep 1998 11:30:29 +0930
From: Martin Gregory <mgregory@asc.sps.mot.com>
Subject: Re: how safe is xor encryption ?
Message-Id: <r8d88vcxc2.fsf@asc.sps.mot.com>

snowhare@devilbunnies.org (Snowhare) writes:

> 
> This is a code fragment from a number validator I wrote.

Whoo hoo - some perl code in this thread!



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

Date: Thu, 17 Sep 1998 03:29:41 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: how safe is xor encryption ?
Message-Id: <36007FC1.AD75D2E2@bbnplanet.com>

Mary E Tyler wrote:

> though this is not exactly PERL related, it has been mentioned here? how
> does one apply for the Usenet points system... i can think of several
> people on my other favorite news group who need to have applications for
> the program sent to them... i'd love to be able to oblige...

Why do people have such a narrow idea of 'what is Perl related' and what
isn't. This was started by someone who wanted to do an e-commerce
solution via Perl. Now, this has digressed into something else, but I
firmly believe we are all learning something here other than 'Hey, read
the FAQ or Hey, Here is my code, deal!'. Every discipline can learn from
another. I learned something from this today so I feel warm and fuzzy.

> #Obligatiory perl comment
> for (;;) {print "You msut bring us a shrubbery!";}

Uh oh, David, another Python geek. 'We are the knights of Neet!'

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Thu, 17 Sep 1998 03:33:58 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: how safe is xor encryption ?
Message-Id: <360080C2.98FB140F@bbnplanet.com>

Exactly. *smooch*

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: 17 Sep 1998 03:34:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tq00u$1q2$1@client3.news.psi.net>

Michael J Gebis (gebis@fee.ecn.purdue.edu) wrote on MDCCCXLII September
MCMXCIII in <URL: news:6tpd86$2a2@mozo.cc.purdue.edu>:
++ Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> writes:
++ 
++ }Ok. I stand corrected. I am still not absolutely certain that this is
++ }100% secure, but certainly much more than I thought. I'll just go mug
++ }the cute waiter instead for my CC fix. ;) 
++ 
++ }Interesting tidbit from www.cypher.net. 
++ 
++ }Why are One-Time Pads Perfectly Secure?
++ 
++ }If the key is truly random, an xor-based one-time pad is perfectly
++  ^^^^^^^^^^^^^^^^^^^^^^^^^^
++ 
++ Nobody chooses "truly random" bitstrings for a key.


Ok. Suppose I want to encrypt my name with a 56 bit key, using XOR.
Which key(s) won't I pick? ;)


Don't forget we are talking about CC#. Simple, 16 digit numbers.  We don't
even need 16 character strings to encrypt it; another 16 digit number
as key, using addition modulo 10 on a digit-by-digit bases as encryption
algorithm is enough.

(That will give a keyspace as large as the address space, with each key
 defining a different bijection between the address space and itself)


Abigail
-- 
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")\n-> define ("foldoc", "perl")) [0] -> print'


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

Date: 17 Sep 1998 03:43:29 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tq0h1$1q2$2@client3.news.psi.net>

Felix S. Gallo (fsg@newsguy.com) wrote on MDCCCXLII September MCMXCIII in
<URL: news:6tphj5$6ap@enews4.newsguy.com>:
++ 
++ Abigail writes:
++ >Mark-Jason Dominus (mjd@op.net) writes:
++ >++ Yes, but it's not clear that you can trust the user to select a 53-bit
++ key.
++ >
++ >But what keeps you from selecting one for them?
++ 
++ Sociology and physics, normally.  Which is to say, imagine if
++ your bank asked you to remember a 300 word text, or to recite
++ a 120 letter 'random string' over the telephone.  People wouldn't
++ accept it, even if it were truly secure (and if they did, they'd likely
++ make errors and get mad).  Until recently, it was also surprisingly
++ difficult to physically carry around 2 megabits.


Uhm, uhm, what keeps you from creating a piece of plastic, about 4 inches
by 2.5 inches, with a nice logo and 16 digits on it - to be used as key?



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())))))))))))))))))))))))


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

Date: Thu, 17 Sep 1998 03:49:59 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: how safe is xor encryption ?
Message-Id: <36008482.4C5FF3DA@bbnplanet.com>

Abigail wrote:

> Uhm, uhm, what keeps you from creating a piece of plastic, about 4 inches
> by 2.5 inches, with a nice logo and 16 digits on it - to be used as key?

Well, what do you mean by 'key' in this sense. Practicality and expense
would be my first guess an this. Granted, credit cards do this but I do
generally regard credit cards as being rather behind the times and
barbaric. Besides, if were getting into that we could easily jump to
retinal scanning and other such 'id' sort of things.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: 17 Sep 1998 03:52:57 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how safe is xor encryption ?
Message-Id: <6tq12p$1q2$3@client3.news.psi.net>

David Formosa (dformosa@zeta.org.au) wrote on MDCCCXLIII September
MCMXCIII in <URL: news:6tpqpl$mvl$1@godzilla.zeta.org.au>:
++ In <6tp5ds$jap$1@client3.news.psi.net> abigail@fnx.com (Abigail) writes:
++ 
++ >Mark-Jason Dominus (mjd@op.net) wrote on MDCCCXLII September MCMXCIII in
++ ><URL: news:6touoo$5j0$1@monet.op.net>:
++ >++ 
++ >++ I still think `xor' is probably a poor choice.
++ 
++ > In fact,
++ >  constructing an unbreakable cipher is easy. First choose a random bit
++ >  string as the key. Then convert the plaintext into a bit string, for
++ >  example by using its ASCII representation.
++ 
++ However xor is crititily dependent of the quality of the randomness that
++ it is provided with.  In other words xor is only as strong as your random
++ number generator.

Certainly.

++ In addtion if that key is reused (as a number of peaple in the former USSR) 
++ did the systems securaty becomes easyly broken.


Yes, but only if the plaintext changes. In this scenario, it's really
the encrypted CC# number that is the key (which is stored on the more
safer database) while the cyphertext is send over the possibly snooped
transmission lines.

And CC# numbers aren't supposed to be reused.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Wed, 16 Sep 1998 22:09:37 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: milliseconds?
Message-Id: <MPG.1069ee98affb77cb98969e@news.south-carolina.net>

In article <6tp3ge$mvf$1@nnrp1.dejanews.com> on Wed, 16 Sep 1998 
19:28:14 GMT, miho21@yahoo.com (miho21@yahoo.com) pounded in the 
following text in responce to a tchrist message:
=> 
=> OUCH! no need to bite, tom :) If you look, youll see a question mark at the
=> end of every sentence in the post since i do not claim to really know perl
=> that much. how bout an explanation instead?
=> 

What he's saying (in his own way) is to look at perlop.

Unix>    man perlop
Windows> perldoc perlop

Scroll down for 'Quote and Quote-like Operators'.

Hope This Helps!

--Matthew


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

Date: Wed, 16 Sep 1998 23:35:35 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: milliseconds?
Message-Id: <1dfh1f7.unfjaiw6iykgN@bay2-213.quincy.ziplink.net>

<miho21@yahoo.com> wrote:

> OUCH! no need to bite, tom :) If you look, youll see a question mark at the
> end of every sentence in the post since i do not claim to really know perl
> that much. how bout an explanation instead?

If you didn't want to know the answers, why did you ask?  And if you did
want to know the answers, why didn't you look in the documentation?

Gotcha!

If you really want an explanation, you know where to find it.

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Wed, 16 Sep 1998 22:58:06 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: newbie DATE question
Message-Id: <MPG.106a446fe57f9a8e98969f@news.south-carolina.net>

In article <6tpfna$nk4$1@client3.news.psi.net> on 16 Sep 1998 
22:56:42 GMT, Abigail (abigail@fnx.com) pounded in the following 
text:
=> Bryan Ingram (cg@cgiworx.com) wrote on MDCCCXLII September MCMXCIII in
=> <URL: news:360027B0.F2FE342F@cgiworx.com>:
=> ++ Hi ..
=> ++ 
=> ++ I'm a C programmer, just getting around to learning Perl ..and I love
=> ++ it! ;)
=> ++ 
=> ++ I'm working on an a program where I need to take the current date and
=> ++ increment it by 1 day.  Is there a nifty routine to do this in Perl, or
=> ++ must I do all the checking myself?  e,g ..must I manually code the logic
=> ++ to determine if the day has exceeded the max for the current month, etc?
=> 
=> use constant HOURS   => 24;
=> use constant MINUTES => 60;
=> use constant SECONDS => 60;
=> 
=> sub tomorrow () {
=>     local $_ = 1 x HOURS x MINUTES x SECONDS;
=>     s/1/sleep $&/eg;
=>     scalar localtime;
=> }
=> 

Nice.  You even obfuscate sleeping for 1 day... :)

=> Abigail
=> 

--Matthew


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

Date: Wed, 16 Sep 1998 22:58:08 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: newbie DATE question
Message-Id: <MPG.106a44b88a6d6b009896a0@news.south-carolina.net>

In article <360027B0.F2FE342F@cgiworx.com> on Wed, 16 Sep 1998 
20:57:53 GMT, Bryan Ingram (cg@cgiworx.com) pounded in the 
following text:
=> Hi ..
=> 
=> I'm a C programmer, just getting around to learning Perl ..and I love
=> it! ;)
=> 
=> I'm working on an a program where I need to take the current date and
=> increment it by 1 day.  Is there a nifty routine to do this in Perl, or
=> must I do all the checking myself?  e,g ..must I manually code the logic
=> to determine if the day has exceeded the max for the current month, etc?
=> 
=> Thanks,
=> Bryan Ingram
=> 

Check out:

http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

Then:

http://www.dejanews.com/dnquery.xp?search=thread&recnum=%3c6ode40
$m1n$1@csnews.cs.colorado.edu%3e%231/1&svcclass=dnserver

Hope This Helps!

--Matthew


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

Date: 17 Sep 98 02:08:10 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <905998369.396261@thrush.omix.com>

Andrew Dalke <dalke@bioreason.com> wrote:
	>snip<
: I'm glad its available.  I've had to write a lot of files
: that are "human formatted" and often end up using a dispatch
: table to drive parser for each line.  It is a lot easier and
: maintainable to say:
        >snip<
: than
        >snip<

        But if you changed qr() to q() it would work in all 5.*
        versions (maybe 4.*?), even if a little slower.

: foreach $term (@parse_table) {
:   if (/$term->[0]/ =~ $str) {   # if it matches the pattern
:      ${$term->[1]}($str);       # call the function
:      break;
:   }
: }

        "break"?  What language is this in again? :-)

: (I cannot test this as we only have 5.004_04 installed, which doesn't
: support qr.)

        So try q(). :-)

: BTW, perhaps someone can answer me this question.  I originally
: wanted the above example to be the equivalent of (in Python):
:  m = term[0].match(str);
:  if m:
:    term[1](str, m)
: that is, to pass the match information to the function handler.

        Easy.  =~ returns a list of the groupings if it matches.

: In the above example I have "range\s+(\d+)" to parse "range 20"
: and I don't want to have to reparse the string to get the 20.
: In python I can have
: def parse_range(str, match_obj):
:   print "The range is", match_obj.group(1)

        Blagh. :-)

: but I can't figure out the right perl way.  Best I can do is:
:   if (/$term->[0]/ =~ $str) {   # if it matches the pattern
:      ${$term->[1]}($str, $1, $2, $3, $4);       # call the function
: and assume I'll never pass more than 4 terms.  This cannot
: be right, which means there's probably some to get the list of
: matches from the last re match.

        if (my @matches = (/$term->[0]/ =~ $str)) {
            $term->[1]->($str, @matches);
        }

: I don't know how and I don't see that information in the perl
: documentation or FAQ.

        =~ is an operator.  From the perlop man page:

        "If used in a context that requires a list value, a
        pattern match returns a list consisting of the
        subexpressions matched by the parentheses in the
        pattern, i.e., ($1, $2, $3...).  (Note that here
        $1 etc. are also set, and that this differs from
        Perl 4's behavior.)  If the match fails, a null
        array is returned.  If the match succeeds, but
        there were no parentheses, a list value of (1) is
        returned."
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Thu, 17 Sep 1998 03:39:54 GMT
From: websites@erols.com (Website Construction Company)
Subject: Perl and Twain
Message-Id: <3600844e.1193553@news.erols.com>

Can someone please direct me to some resources for implementing or
running twain from a perl script?

Thanks

Irwin
websites@erols.com


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

Date: Wed, 16 Sep 1998 18:18:46 -0500
From: Bryan Rivera <brivera@texascommerce.com>
Subject: perl development environment
Message-Id: <36004756.656FDD2D@texascommerce.com>

Has anyone had any experience with PerlBuilder from SolutionSoft
(www.solutionsoft.com)?  It seems to have potential; however, I'm also
looking for the existence of any perl editing/debugging customization
with MetroWorks CodeWarrior.  Does anyone know if this is possible or if
it already exist?

Bryan Rivera
bryan.rivera@chase.com


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

Date: Wed, 16 Sep 1998 23:02:10 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Remove files/Dir help
Message-Id: <MPG.106a45b865af003e9896a1@news.south-carolina.net>

In article <6tpeh1$n9$1@nnrp03.primenet.com> on Wed, 16 Sep 1998 
15:23:29 -0700, Doyle Johnson (sales@madm.com) pounded in the 
following text:
=> Hi all,
=> 
=>    Can someone please shoot me the correct working syntax for removing
=> (deleting) files and directories???/ Please.....
=> 
=> I am not having any luck with
=> rm
=> rmdir
=> 
=> Even though they are stated in the man as correct.... it might be the
=> systax... can someone please give me a hand?

Errr...  I assume you mean in Perl?

Perl has no 'rm' function.

What your looking for is 'unlink'.

Then you can 'rmdir'.  But only if the directory is empty.

Oh, and it's very hard for us to help you with your syntax when 
you don't show us what you've tried...

Hope This Helps!

=> MadmX

--Matthew


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

Date: 16 Sep 1998 22:23:21 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Style question re ($k => $v)
Message-Id: <6tprqp$8ob$1@monet.op.net>


I remember the first time I saw Randal write

	kill HUP => $pid;

I thought it was really weird.  Now I don't bat an eyelash, and I
always write it that way.

Lately I've found myself writing

	while (($k => $v) = each %h) {
	  ...
	}

Does anyone have any comments about this?


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

Date: Thu, 17 Sep 1998 03:00:16 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: Style question re ($k => $v)
Message-Id: <6tpt1r$171$1@rand.dimensional.com>

[posted to comp.lang.perl.misc and mailed to the cited author]

In article <6tprqp$8ob$1@monet.op.net>
mjd@op.net (Mark-Jason Dominus) wrote:

>Lately I've found myself writing
>
>	while (($k => $v) = each %h) {
>	  ...
>	}
>
>Does anyone have any comments about this?

I like it, in some cases :-).

I think => looks like ->.  I tend to think of -> 
(and => in most cases where I use it) as defining
a relationship where the left side `contains' 
the right side.  This nicely covers $obj -> method(), 
$ref -> [0], and %hash = ( key => 'value').

On the other hand, I think that

@array = map do_stuff() => @list

is unnecessarily obfuscated.

dgris
-- 
Daniel Grisinger           dgris@perrin.dimensional.com
`Bangladesh.  Because life is too short to run bad code.'
                               Jon Orwant


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

Date: 16 Sep 1998 23:08:42 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Style question re ($k => $v)
Message-Id: <6tpufq$90j$1@monet.op.net>

In article <6tprqp$8ob$1@monet.op.net>, Mark-Jason Dominus <mjd@op.net> wrote:
>	kill HUP => $pid;

The other one of these that I like is

	bless $self => $package;

which I use all the time.




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

Date: Thu, 17 Sep 1998 12:50:41 +1000
From: Peter Moore <moorep@ssmb.com.au>
Subject: SybPerl and Images
Message-Id: <36007900.B0B3B6BD@ssmb.com.au>

Hi.
    I have a question about SybPerl and images, jpegs to be precise. If
i use my example (at the end of this post) it works fine in a web page
which only displays an image using the mime type of image/jpeg, but what
i would like to find out is how to make it display in a "normal" HTML
page using the <IMG SRC= tag.
I have tried the example in the FAQ which uses this
while(($bytes = $dbh->dbreadtext($buf, 512)) != NO_MORE_ROWS) { blah
blah
but it doesn't work either.
Any ideas?
Thanks in advance
Peter
--
Peter Moore
Project Manager, Internet Technology
Salomon Smith Barney Australia Securities
http://www.ssmb.com.au/
*******************************************

##########################################################
print "Content-type: image/jpeg\n\n";
$ret = $dbh->sql("select staff_photo from databaseName where staff_id =
$staff_id");
$status = $dbh ->DBCOUNT;
if($status==0 || $status < 0) {
   return;
}
# yes i could have done this differently
 foreach (@$ret)  {
     @row = @$_;
    print "$row[0]"; # this is the image
}

 if($status<=0) {
  return 1;
 }
 $dbh->dbclose;
#####################################################################





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

Date: Wed, 16 Sep 1998 23:22:29 -0400
From: "Jay Guerette" <JayGuerette@pobox.com>
Subject: Tie STDOUT
Message-Id: <6tpvd5$dor@news-central.tiac.net>

This code is intended to capture output to STDOUT and redirect it elsewhere.
I have 2 questions about the following snippet:

1. Why doesn't PRINTF work?
2. Likewise, I've tried WRITE to no avail. Any ideas why?


package Tie::StdOut;
sub TIEHANDLE {
    my $class=shift;
    bless {},$class; }

sub PRINT {
    my $self=shift;
    $::window->document->write(join('',@_)); }


sub PRINTF {
    my $self=shift;
    $::window->document->write(sprintf(shift,@_)); }

tie *STDOUT,Tie::StdOut;
package main;

print "hello world<br>";
$greeting="hello again";
printf "%s<br>",$greeting;





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

Date: Wed, 16 Sep 1998 22:09:36 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Un-tainting a variable for the following format
Message-Id: <MPG.1069c593a330279698969d@news.south-carolina.net>

In article <6topb0$8bi$1@nnrp1.dejanews.com> on Wed, 16 Sep 1998 
16:34:40 GMT, bill_mcintyre@hotmail.com 
(bill_mcintyre@hotmail.com) pounded in the following text:
=> 
=> $recnum =~/(\w[\w.-]*)/;
=> $recnum ="$1";
=> 
=> 
=> This however makes $recnum have this value "97-143" how can I also translate
=> the space open paren alpanumeric close paren or  (S5)?
=>

I may be misunderstanding what your saying, but:

/(\w[\w.-]*) (\(\w)\)/;

Should work?
 
=> Many Thanks in advance.

Hope This Help(s|ed)!

=> Bill

--Matthew


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

Date: Thu, 17 Sep 1998 13:01:19 +1000
From: Peter Moore <moorep@ssmb.com.au>
Subject: Re: Unix Perl server?
Message-Id: <36007B7F.A3DFEDF9@ssmb.com.au>

Joseph,
    Do you mean on a web server? If so, there is a module for the Apache
www server which does this.
regards
peter
--
Peter Moore
Project Manager, Internet Technology
Salomon Smith Barney Australia Securities
http://www.ssmb.com.au/
*******************************************

Joseph DuBois wrote:

> Well met,
>
>     Awhile back I remember seeing a comercial program that acted as
> the perl interpreter, but stayed running as a process. Thus it cut
> out the startup time of the perl interpreter.
>
>    The problem is I do not rember the company, or product name. I
> was wondering if anyone knows the name, and even better has used
> or tested it.
>
> Thanks
>
> --
> -------------------------------------------------------
> Joseph DuBois
> mailto:jdubois@keane.com  (Work)  http://www.keane.com/








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

Date: Thu, 17 Sep 1998 03:22:03 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Who posts original posts on CLPM?
Message-Id: <36007DF6.49C2315@bbnplanet.com>

> Others within this newsgroup have abundant training in the elementary statistical
> methods required for such a study. It requires no special degree or formal job
> description within such as the US Census.

Hrm. 'Abundant Training in Elementary Statistical Methods'. The census
has no corner on demographics so it is indeed interesting that you
should mention it. Otherwise, I still contest that raw data is raw data,
not 'statistics' and even the census bureau would have a hard time
calling any of the above thread such. There are no 'statistics' in the
previous assumptions. And even a friend of mind who happens to be a
nobel laureate agrees that there are 'Lies, Damn Lies, and Statistics'.
Let's give this a rest, eh?

P.S There are people who are professional statisticians and
demographers. It may not require a degree as such but a skill.

e.

"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon."  R. Carver


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

Date: Wed, 16 Sep 1998 23:35:36 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Who posts original posts on CLPM?
Message-Id: <1dfh1z3.uub2xo7v4y3gN@bay2-213.quincy.ziplink.net>

Paul J. Adams <adams4@worldnet.att.net> wrote:

> I'm not entirely sure of what you're objecting to.  Let me try to simplify
> the issue.  For the moment, let's assume that we've determined that Windows
> users are more likely to post root messages than *nix users.  (Asher's
> statistics indicate that when comparing Windows to *nix users, disregarding
> other operating systems, 68% of the root messages come from Windows users,
> and 32% come from *nix users).

Possible explanations for this hypothetical statistic:

1.  The number of posts from Windows users is equal to the number of
posts from Unix users, but Windows users are more likely to post root
messages.

2.  The number of posts from Windows users is significantly greater than
the number of posts from Unix users, and Windows users post root
messages and followup messages with equal likelihood.


You need to consider all four combinations of operating system and post
type in order to calculate correlation.


Personally, my objection is not with the conclusion that Windows users
are more likely to post root messages; this could very well be the case,
although I have not yet seen a statistical analysis which proves it.  I
object to the conclusion that Windows users are more likely to post
'misguided' messages, based on the unfortunate assumption that all root
messages are 'misguided' messages.

-- 
 _ / '  _      /         - aka -         rjk@coos.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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 V8 Issue 3735
**************************************

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