[10220] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3813 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 24 12:07:56 1998

Date: Thu, 24 Sep 98 09:00:23 -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           Thu, 24 Sep 1998     Volume: 8 Number: 3813

Today's topics:
        ANNOUNCE: WatchdogService-0.03.tar.gz paul@miraclefish.com
    Re: any way to encrypt my script? jmh@pubserv.com
    Re: any way to encrypt my script? <uri@sysarch.com>
    Re: Checking if open dir contains a sub directory <jdibb@clariion.com>
    Re: Confused: visibility of "my" vars <ajohnson@gpu.srv.ualberta.ca>
        Creating FileHandle in Modules and Passing Back narins@my-dejanews.com
        Creating FileHandle in Modules and Passing Back narins@my-dejanews.com
    Re: DBD::Oracle on Linux? (John D Groenveld)
    Re: grep syntax question <jdf@pobox.com>
        Help: What's wrong with sysread? <Stan_Majka@vapower.com>
    Re: How to implement (efficiently) an X minute cycle ? (Abigail)
        how to reduce ugly multiple if statements vicuna@my-dejanews.com
    Re: How to tinker with @_ in threaded Perl? <sugalskd@netserve.ous.edu>
        ls or dir comand in perl <claudio@crpweb.com>
    Re: ls or dir comand in perl (Michael Fuhr)
    Re: ls or dir comand in perl <egwong@netcom.com>
    Re: mod_perl woes (I.J. Garlick)
    Re: Passing a Variable to a Text Input...strange questi <jdf@pobox.com>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses (Chris Russo)
    Re: Perl & Java - differences and uses (Chris Russo)
    Re: Poll: How Did You Learn Perl? (Clinton Pierce)
    Re: Poll: How Did You Learn Perl? droby@copyright.com
    Re: Poll: How Did You Learn Perl? droby@copyright.com
    Re: Poll: How Did You Learn Perl? <eashton@bbnplanet.com>
    Re: Q: Picking an element from a hash (not knowing whic droby@copyright.com
        ROADS 2.00 - a free Yahoo-like system written in Perl <martinh@gnu.org>
    Re: Rotating an array. (Abigail)
        Security problem <Geert.Roovers@ericsson.com>
        URGENT-PLEASE READ!!! <datanomics@worldnet.att.net>
    Re: var indirection in a RE <jdf@pobox.com>
    Re: var indirection in a RE <r28629@email.sps.mot.com>
    Re: weird telnet problem (Clinton Pierce)
    Re: Where to put cgi-lib.pl (Patrick Timmins)
    Re: Where to put cgi-lib.pl <upsetter@ziplink.net>
        Win32 and OLE/ADO <support@acuity.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 24 Sep 1998 14:30:04 GMT
From: paul@miraclefish.com
Subject: ANNOUNCE: WatchdogService-0.03.tar.gz
Message-Id: <6udl1c$c15$1@news.neta.com>

Soon to be at $CPAN/authors/id/PSHARPE/WatchdogService-0.03.tar.gz


NAME
    Watchdog::Service - Perl extension to monitor services

SYNOPSIS
      use Watchdog::Service;
      $s = new Watchdog::Service($name,$pstring);
      print $s->id, $s->is_alive ? ' is alive' : ' is dead', "\n";

DESCRIPTION
    Watchdog::Service is an extension for monitoring services
    running on a Unix host. The class provides a trivial method for
    determining whether a service is alive. More sophisticated
    methods can be implemented by creating subclasses of
    Watchdog::Service e.g. Watchdog::HTTPService uses the status of
    an HTTP 'GET' method to decide if a web server is alive.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

Date: Thu, 24 Sep 1998 14:51:49 GMT
From: jmh@pubserv.com
Subject: Re: any way to encrypt my script?
Message-Id: <6udma6$add$1@nnrp1.dejanews.com>

I don't mean to get back to the point or anything, but...

I have a situation in which a client specifically wants the source code
"protected" (for my purposes, this can be read "obfuscated").  The portability
and ease of use of Perl have made it my choice for implementation, so I was
hoping that the original poster's intent was similar to mine.

Can anyone suggest additional methods for implementing (or resources
discussing approaches for) obfuscating Perl code?

-- jeff
&#137;

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 24 Sep 1998 11:26:11 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: any way to encrypt my script?
Message-Id: <x7yar9v8fg.fsf@sysarch.com>

>>>>> "j" == jmh  <jmh@pubserv.com> writes:

  j> I don't mean to get back to the point or anything, but...  I have a
  j> situation in which a client specifically wants the source code
  j> "protected" (for my purposes, this can be read "obfuscated").  The
  j> portability and ease of use of Perl have made it my choice for
  j> implementation, so I was hoping that the original poster's intent
  j> was similar to mine.

  j> Can anyone suggest additional methods for implementing (or
  j> resources discussing approaches for) obfuscating Perl code?

check out the obsfucated perl contest in the perl journal.

just write very bad code and no one will ever want to copy it (except if
your are matt :-). your clients will never know the difference.

pick very short letter names for everything. no one could understand or
debug it then (including you!).

use crypt on your script (perl poetry?). then write a wrapper that
requires the password and decrypts the code and runs it. of course this
has to be done for every execution.

write it in python. that is very obscure perl.

hth,

uri

delayed :-)


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire  ----------------------  Perl, Internet, UNIX Consulting
uri@sysarch.com  ------------------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com


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

Date: Thu, 24 Sep 1998 11:19:16 -0400
From: "Jim Dibb" <jdibb@clariion.com>
Subject: Re: Checking if open dir contains a sub directory
Message-Id: <6udnv3$bua@wellspring.us.dg.com>

Im pretty new to this but why not use the File::Path::rmtree() function.
(don't know if all those colons are the proper syntax.

Doyle Johnson wrote in message <6u3stj$8sv$1@nnrp02.primenet.com>...
>
>  basically I need to open a directory, delete all files, if there is a sub
>dir, open it, delete all files etc.. etc..
>
>




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

Date: Thu, 24 Sep 1998 09:06:42 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Confused: visibility of "my" vars
Message-Id: <360A51F2.755209D6@gpu.srv.ualberta.ca>

Koos Pol wrote:
> 
> "my" variables which are declared in the main body, are visible in
> subs. But declared in a sub, a "my" is invisible everywhere else.
> 'perldoc -f my' explicitely talks about an anclosing block. This implies
> the same behaviour for the main body. Isn't the main body an enclosing
> block?

What's 'the main body'? ... the file itself is a scope, you may think of
the file as being implicity wrapped in {}. So, a my() variable declared
at the top of my file has file scope, it will be visible within subs 
defined inside that scope ... my() variables defined inside a sub are
scoped to that sub block. In terms of the visibility of my() variables,
think of a block as a little house made of one-way glass ... from 
inside you can see the world around you, but from the outside its 
just a shiny box.

regards
andrew


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

Date: Thu, 24 Sep 1998 15:15:56 GMT
From: narins@my-dejanews.com
Subject: Creating FileHandle in Modules and Passing Back
Message-Id: <6udnnc$c61$1@nnrp1.dejanews.com>

I have read (understood?) a host of posts (yeah, I like poetry, so?)
on FileHandle.

What I need, honorable ladies and gentlemen,

package MY_PACKAGE;  sub prep_filehandle_for_caller {  foreach
$name_i_want_to_refer_to_the_handle_by (@_); { # $n for short  open ??????,
">/my/dir/struct/$n";  print ?????? $STANDARD_FILE_HEADER  ? push
@return_array, ??????;	return @return_array

MAIN PROGRAM__
     (??????,??????) = &prep_filehandle_for_caller("OUTPUT","REPORT");

     some method or operator to attach format REPORT to returned FILEHANDLE

     write(REPORT);

     format REPORT =
     .



Perl5.004 built with DEBUGGING and Dynamic Linking on HP-UX10

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 24 Sep 1998 15:15:54 GMT
From: narins@my-dejanews.com
Subject: Creating FileHandle in Modules and Passing Back
Message-Id: <6udnnb$c60$1@nnrp1.dejanews.com>

I have read (understood?) a host of posts (yeah, I like poetry, so?)
on FileHandle.

What I need, honorable ladies and gentlemen,

package MY_PACKAGE;  sub prep_filehandle_for_caller {  foreach
$name_i_want_to_refer_to_the_handle_by (@_); { # $n for short  open ??????,
">/my/dir/struct/$n";  print ?????? $STANDARD_FILE_HEADER  ? push
@return_array, ??????;	return @return_array

MAIN PROGRAM__


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 24 Sep 1998 10:40:50 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: DBD::Oracle on Linux?
Message-Id: <6udlli$osl$1@tholian.cse.psu.edu>

The answer was posted to the dbi-users mailing list. See your README's
for the URL.
John
groenveld@acm.org


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

Date: 24 Sep 1998 17:06:55 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: "Stephen Totten" <stephent@comm.mot.com>
Subject: Re: grep syntax question
Message-Id: <m3g1dhlfcg.fsf@joshua.panix.com>

"Stephen Totten" <stephent@comm.mot.com> writes:

> grep {?i/.pdf$/} $file

You may have been thinking of the (?i) directive

  /(?i)\.pdf$/

but you really ought to use the /i modifier

  /\.pdf$/i

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 24 Sep 1998 14:24:35 GMT
From: "Stan" <Stan_Majka@vapower.com>
Subject: Help: What's wrong with sysread?
Message-Id: <01bd3887$f84edbe0$adea6a9e@oj-majkas>

Can anyone tell me what's going wrong with sysread?

I'm trying to read a 711 KB file, but sysread quits after only about 42 KB.
 

The file contains variable length records.  Each record starts and ends
with a 
2-byte record length.  I read the length of the first record, then loop,
reading 
each record plus the 2-byte length field for the next record.

I can successfully read 162 records, but on the 163rd, I ask for 280 bytes
but only 
get 10.  If I do another sysread for 270 bytes, I get 0.  If I keep doing
sysreads 
for 999 bytes, I keep getting 0 bytes read.

I KNOW there's valid data there.  I can open the file with a hex editor and
see 
what looks like a perfectly good 163rd record, as well as a 164th, 165th,
etc.

Running Perl for Win32 on NT 4.0.


Thanks in advance,
Stan


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

Date: 24 Sep 1998 15:10:39 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to implement (efficiently) an X minute cycle ?
Message-Id: <6udndf$i8k$1@client3.news.psi.net>

David Formosa (dformosa@zeta.org.au) wrote on MDCCCL September MCMXCIII
in <URL:news:6uc31n$9t4$1@godzilla.zeta.org.au>:
++ In <6ubd4l$68f$1@client3.news.psi.net> abigail@fnx.com (Abigail) writes:
++ 
++ [...]
++ 
++ >This doesn't use a fork():
++ 
++ >while (1) {
++ >    $then = 600 + time;
++ >    do some stuff;
++ >    sleep ($then - time);
++ >}
++ 
++ What happens when time>$then ?  Experements seem to indercate that it
++ ether hangs or sleeps for a very long time.



$ perl -we 'print sleep (-100), "\n"'
0
$

But if your sleep behaves differently, add an appropriate if statement:

       ($delay = $then - time) > 0 && sleep $delay;



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: Thu, 24 Sep 1998 15:11:30 GMT
From: vicuna@my-dejanews.com
Subject: how to reduce ugly multiple if statements
Message-Id: <6udnf1$brr$1@nnrp1.dejanews.com>

Hi,

  Background:  I have a set of files that needs to be matched to another set
of files.  The second set of files always have the same name results.txt and
are uniquely identified by their directory path name which should include a
directory named control.  Unfortunately, data entry folks in the past of
named the control directories idiosyncratically so that sometimes they are
crtnl crtl crtlrev and so on.  What I want to do is loop over guesses as to
the name of directory.	I am using a set of if statements which work but just
look ugly to me.  Basically the structure is:

  $first_guess = 'h:\first\second\third\control\file.ext';  if (!-e
$first_guess) {$first_guess =~ s/control/cntrl/i; print "found\n";  if (!-e
$first_guess) {$first_guess =~ s/cntrl/cntrl1/i;print "found\n"}  }

    $real = 'h:\first\second\third\cntrl2\file.ext';

    $first_guess = 'h:\first\second\third\control\file.ext';
    if (!-e $first_guess$first_guess ne $real) {
        $first_guess =~ s/control/cntrl/i;
        if (!-e $first_guess) {
            $first_guess =~ s/cntrl/cntrl1/i;
            if (!-e $first_guess) {$first_guess = ();print "not found\n";}
        }
    }
And this works but I have a bunch of these and it just looks ugly to me.  Any
feedback or suggestions?

Bob

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 24 Sep 1998 06:19:12 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: How to tinker with @_ in threaded Perl?
Message-Id: <6uco90$a26$1@news.NERO.NET>

In comp.lang.perl.misc Mark-Jason Dominus <mjd@plover.com> wrote:
: I have a program which, for various reasons, contains the following
: code:

: 	sub wrapper { unshift @_, qq{$cref}; goto &_handler }

: 	sub _handler {
: 	  my $cref = shift;
: 	  ...
: 	}

: This works fine on many systems, but recently I have been getting
: failure reports.  My hypothesis is that under threaded Perl, @_ is
: lexical, so the effect of the `unshift' is confined to `wrapper', and
: _handler never gets the extra $cref argument.

Yup, looks like the reason.

: I imagine there would be a similar problem with an AUTOLOAD function
: that wanted to modify the function arguments before calling the real
: function.

: How can I work around this?

Don't do that? :-)

Seriously, I don't think there's a whole lot you can do. @_ being lexical
breaks these tricks pretty badly. Tell folks "threads are experimental.
Don't be surpised that it breaks" 

Alternately, you could always hack the core so $_ and @_ are per-thread
globals (Which doesn't really make them global, I guess) rather than
lexicals. But that's a fairly significant piece of hackage, I think.
(Though I do like it, at least as a general concept)

					Dan


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

Date: Thu, 24 Sep 1998 16:12:20 +0200
From: "Claudio Villa Santa" <claudio@crpweb.com>
Subject: ls or dir comand in perl
Message-Id: <6udjti$bsb$1@news0-alterdial.uu.net>

Hi,

Someone can tell my how I can have list of file present in a directory in an
perl array?

Thanks

Claudio




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

Date: Thu, 24 Sep 1998 14:45:30 GMT
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: ls or dir comand in perl
Message-Id: <6udlu4$a2q@flatland.dimensional.com>

"Claudio Villa Santa" <claudio@crpweb.com> writes:

> Someone can tell my how I can have list of file present in a directory in an
> perl array?

Take a look at the perlfunc manual page and search for the word
"directory".  Among the hits you'll find some functions for opening
and reading directories.

-- 
Michael Fuhr
http://www.fuhr.net/~mfuhr/


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

Date: Thu, 24 Sep 1998 15:46:12 GMT
From: Eric Wong <egwong@netcom.com>
Subject: Re: ls or dir comand in perl
Message-Id: <egwongEzsp50.F18@netcom.com>

Claudio Villa Santa <claudio@crpweb.com> wrote:
: Someone can tell my how I can have list of file present in a directory in an
: perl array?

Two ways spring to mind.
  @files = split(/\n/, qx{ ls };    # see perlop manpage for qx{}

     or

  opendir (D, ".") || die "Can't open directory.";    # see perlfunc manpage
  @files = readdir(D);

The first uses an external program (ls) while the second
uses system calls.  By the way, both methods will list
both files AND directories present.

Eric

[cc'd]


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

Date: Thu, 24 Sep 1998 12:42:48 GMT
From: ijg@csc.liv.ac.uk (I.J. Garlick)
Subject: Re: mod_perl woes
Message-Id: <EzsGnC.5t3@csc.liv.ac.uk>

In article <comdog-ya02408000R2309981646020001@news.panix.com>,
comdog@computerdog.com (brian d foy) writes:
> In article <uDcO1.103$Fl6.1773475@news.abs.net>, ryan@mail.ramresearch.com (Ryan McGuigan) posted:
> 
[snipped]
> 
> mod_perl involves persistent processes, so if one doesn't clean up 
                                                            ^^^^^^^^
just exactly what does this mean in real terms?

Do we physically have to undef every global variable, all variables? will
perl no longer do garbage collecting for us?

I think I understand what this means and I have read it in several documents
some of which you mention below but I haven't found anywhere it says exactly
what to do and what not to do. For instance if I was to create and object say
and return a blessed reference do I physically ned to destroy it? or can I
leave it (don't know the term here, alive?) in existance and reasign values
to it next time I use an httpd that has already initialised it? I have only
just started using mod_perl and have run slap bang into the global
variable persistance problem as well as some others that necessitated a
quick re-write of my code.  I am still in the development stage and get the
feeling that I should be doing somehting about destroying some of the stuff
I have created but don't know how far I have to go.

If I have missed something obvious then pleas point me to the relevant faq.
> after oneself, have poor programming style, or lightly use global
> variables, one can easily get bitten.
> 
> be sure to read all of the docs installed by mod-perl as well as the
> stuff at <URL:http://perl.apache.org>.
> 
> good luck. :)
> 

-- 
--
Ian J. Garlick
<ijg@csc.liv.ac.uk>

Fame is vapor; popularity an accident; the only earthly certainty is
oblivion.
              -- Mark Twain



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

Date: 24 Sep 1998 17:03:41 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: usenet@vikrampant.com
Subject: Re: Passing a Variable to a Text Input...strange question.
Message-Id: <m3iuidlfhu.fsf@joshua.panix.com>

vpant@wam.umd.edu (Vikram Pant) writes:

> I have a text file that is called into several Perl scripts.  Problem is 
> that in the text input file I have a few variables I would like replaced 
> when called into the script itself.

  please RTFM: perlfaq4, "How can I expand variables in text strings?"

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Thu, 24 Sep 1998 14:41:38 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <CSsO1.1770$Ge.5932779@ptah.visi.com>

Inner classes should be avoided like the plague for the most part.
The only exceptions I would make would be for event handlers that do
not provide any external access to their containing class.  Not only
are inner classes an ugly kludged, they allow priveledged package
level access to the private members of their containing class.

In comp.lang.java.programmer bjohnsto_usa_net <bjohnsto_usa_net@my-dejanews.com> wrote:

:> >  Zenin <zenin@bawdycaste.org> wrote:
:> [...]  My understanding is that Java byte code can't do lambda
:> >> 	style functions for instance, thus making things like a Java
:> >> 	byte code backend for Perl [...]
:> 

: David Formosa <dformosa@zeta.org.au> wrote in article 

:> A lambda style function is a function that has no name.  For example in
:> perl I can go,
:> 
:> $var = sub {
:> 	$x =shift;
:> 	$y =shift;
:> 	return $x+$y;
:> }
:> 
:> and in lisp I can go
:> 
:> (setf var (lambda (x y) (+ x y)))
:> 
:> The function is now only advalable via the verable that it has been
: assigned
:> to it.  


: Is a lambda style function functionally different to inner classes?
: I find that inner classes do what I could use smalltalk code blocks [ ... ]
: for.

: Here is how an inner class looks.

: public class lambda
: {
:   interface ifunc
:     {
:       public double f(double d);
:     }

:   public static void main(String args[])
:     {
:       ifunc o1 = new ifunc() { public double f(double d) { return d * 2; }
: };
:       ifunc o2 = new ifunc() { public double f(double d) { return d * 3; }
: };
:       System.out.println("ifunc 4.0 - " + o1.f(4.0)+ "\n");
:       System.out.println("ifunc 4.0 - " + o2.f(4.0)+ "\n");
:     }
: }

: Although the SIGNATURE of the function has a name (ifunc.f) the actual
: functions do not.

: Java typed solution is definitely more verbose than the other languages.

: If there is some design which needs lambda style functions instead of inner
: classes I would be interested.

: Brendan Johnston


-- 
George Reese (borg@imaginary.com)       http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
   "Keep Ted Turner and his goddamned Crayolas away from my movie."
			    -Orson Welles


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

Date: Thu, 24 Sep 1998 08:24:37 -0700
From: news@russo.org (Chris Russo)
Subject: Re: Perl & Java - differences and uses
Message-Id: <news-2409980824370001@buzz.hq.alink.net>

>John Porter <jdporter@min.net> wrote:
>> So we (some of us) are still waiting for the proof that 
>> all Americans speak French.  Maybe you could cite some Bureau of
>> Census statistics.
>
>George Reese <borg@imaginary.com> writes:
>> No, this is not the case at all.  Only one person has actually
>> challenged any of my premises.  And that appears to be the only
>> constructive line of discussion going on in this thread.


George, you threw away your credibility at the very beginning of this
thread, when you asked for just *one* example of Perl that was simpler
than an equivalent task performed in Python.

One was given to you, and you denied that it was simpler - demonstrating a
clear lack of judgement.

You've demonstrated no better judgement since then.

As Mr. Fardy stated, don't let silence be confused for assent.

I, for one, don't spend a lot of time debating matters with fools.

Regards,

Chris Russo

-- 
Chris Russo
news@russo.org
http://www.russo.org


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

Date: Thu, 24 Sep 1998 08:34:07 -0700
From: news@russo.org (Chris Russo)
Subject: Re: Perl & Java - differences and uses
Message-Id: <news-2409980834070001@buzz.hq.alink.net>

In article <aJeO1.1642$Ge.5442150@ptah.visi.com>, George Reese
<borg@imaginary.com> wrote:

>Goddamn, you are a fucking idiot.  Those two are not contradictory
>statements and I am tired of playing word games with you and the other
>group of clowns who seem so utterly incapable of reading.

Your lack of precision with the English language makes John Porter a
"fucking idiot"?

Don't let the frustration of not being able to form a coherent argument
get to you, George.  Instead, try to learn something from those who
frustrated you by outperforming you.

Good Luck,

Chris Russo

-- 
Chris Russo
news@russo.org
http://www.russo.org


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

Date: 24 Sep 1998 14:02:15 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6udjd7$jjg2@eccws1.dearborn.ford.com>

In article <360923EC.8E9919D0@min.net>,
	John Porter <jdporter@min.net> writes:
>.. Llama v.1, .. Camel v.1, .. Camel v.2
   Yup.  Yup.  Yup.

>.. Other book (give name)
	Friedl's Regular Expressions

>.. Docs included in the distribution
    Perl 4 manpage was great.
        (One of these days, I'll get used to the Perl 5 one.)

>.. Something on the WWW
    FMTYEWK from Tom C.

>oo Something in USENET
    Lots of DejaNews & comp.lang.perl.*

>.. Class/tutor
    Oddly enough from _teaching_ perl.  Having to 
    explain a thing helps you understand a thing.

-- 
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |
|  cpierce1@ford.com    |     you get rotten miracles"    | dcicorp.com/ |
| fubar@ameritech.net   |--Miracle Max, The Princess Bride| ~clintp      |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



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

Date: Thu, 24 Sep 1998 14:14:16 GMT
From: droby@copyright.com
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6udk3n$7oe$1@nnrp1.dejanews.com>

In article <MPG.10730d06c758f81e9896b3@news.south-carolina.net>,
  dragons@scescape.net (Matthew Bafford) wrote:

> => X Camel v.2
>
> I read it as a bedtime story.  (Strange huh?)
>

That was my approach to Principia Mathematica.	I hear Origin of Species is
good for this too.

--
Don Roby

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 24 Sep 1998 14:21:36 GMT
From: droby@copyright.com
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <6udkhf$8b5$1@nnrp1.dejanews.com>

In article <360923EC.8E9919D0@min.net>,
  John Porter <jdporter@min.net> wrote:
> So here's a poll for everyone.
>
> From what resource(s) did you learn Perl?
>
> . Llama v.1
> . Llama v.2
> . Camel v.1
> . Camel v.2
> . Other book (give name)
> . Docs included in the distribution
> . Something on the WWW
> . Studying existing code
> . Class/tutor
>

First: Camel 1, docs, existing code, my own mistakes.

Continuing Ed: all of the above plus Camel 2, this ng, some of Randal's
		articles and the FMTEYWTK.

--
Don Roby

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 24 Sep 1998 15:15:43 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Poll: How Did You Learn Perl?
Message-Id: <360A5FB3.B21AD056@bbnplanet.com>

Jim Brewer wrote:

> So let's get this straight. With every jar of Skippy, creamy or
> chunky, I get a Perl latest.tar.gz? Now, is this in the jar (like in a
> ceral box) or is it attched (by some means currently ill-defined) to
> the outside of the jar? Will it add much to the cost of Skippy? Or,
> will the fear of such a potent Skippy cause a downturn in Skippy
> uptake and therefore a radical re-pricing making Skippy much less
> expensive and by extension my latest.tar.gz even free-er?

Free is an imaginary concept frequently used as a marketing gimmick. :)
Ask any economist. Everything costs something. Even Perl costs something
and it generates revenue in many ways.

> Personally, I hate peanut butter. Can we say "free" means "large
> double pepperoni with extra cheese"? Now where do they attach the
> latest.tar.gz?

With the extra garlic. :)

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, 24 Sep 1998 13:58:46 GMT
From: droby@copyright.com
Subject: Re: Q: Picking an element from a hash (not knowing which!) [Zorn's lemma?]
Message-Id: <6udj6m$6qj$1@nnrp1.dejanews.com>

In article <crnau6.vr.ln@flash.net>,
  tadmc@flash.net (Tad McClellan) wrote:
>
>    I am not familar with Zorn's lemma.
>

Actually, the description she gave was the Axiom of Choice.  This happens to
be logically equivalent to Zorn's lemma, which says:

If S is any nonempty Partially Ordered Set in which every Chain has an upper
bound, then S has a maximal element. This statement is equivalent to the Axiom
of Choice.

Note that neither of these is a provable mathematical fact.  They constitute
part of the set of assumptions underlying much of modern math.	(You only
need assume one or the other - they do imply each other, assuming all the
other more standard assumptions of set theory.	Some mathematicians do not
approve of these axioms, and call any proof depending on them "magic".

This is all of course thoroughly off-topic and belongs in sci.math.

--
Don Roby
<droby@copyright.com>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 24 Sep 1998 14:30:36 GMT
From: Martin Hamilton <martinh@gnu.org>
Subject: ROADS 2.00 - a free Yahoo-like system written in Perl
Message-Id: <6udl2c$c29$1@news.neta.com>


                   ROADS software version 2.00
                   ---------------------------
                <URL:http://www.roads.lut.ac.uk/>

WHAT IS THIS ?

The ROADS software is a collection of tools which can be used in
building on-line catalogues.  Key features of the package are :-

  . Simple text based resource description format
  . World-Wide Web forms based resource description editor
  . WWW and WHOIS++ based search capability 
  . Automatic generation of customised views of the
      catalogue, e.g. breakdowns by subject category
  . Automatic generation of listings of recently added
      resources
  . Dynamic browsing of resources in particular subject
      categories
  . Highly customizable HTML output
  . Distributed indexing and searching across multiple
      WHOIS++ servers using the Common Indexing Protocol
      (centroids)
  . Limited support for indexing and searching Harvest
      and Z39.50 servers
  . Tested for Year 2000 compliance according to the
      British Standards Institute's check list

It also features a number of World-Wide Web based database
administration tools, e.g.

  . Index maintenance
  . Removing/archiving old resource descriptions
  . Overall installation consistency checking
  . Resource description consistency checking
  . Review date checking
  . Checking for broken links (dangling URLs)
  . Checking for duplicate URLs
  . Checking for URL currency, e.g. records which
      have (or have not) been changed recently

Most of these tools can be used independently of each other.  You
could choose, for example, not to support searching via WHOIS++ - or
not to generate subject category breakdowns of your resource
descriptions.  However, all of the tools are written to manipulate
their data in the IAFA template format, a popular way of writing
simple Internet resource descriptions.




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

Date: 24 Sep 1998 15:13:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Rotating an array.
Message-Id: <6udnio$i8k$2@client3.news.psi.net>

Larry Rosler (lr@hpl.hp.com) wrote on MDCCCXLIX September MCMXCIII in
<URL:news:MPG.10731134b9d1cf8f9897b5@nntp.hpl.hp.com>:
++ [Posted to comp.lang.perl.misc and a copy mailed.]
++ 
++ In article <6ubo8u$dl1$1@client3.news.psi.net> on 23 Sep 1998 21:13:02 
++ GMT, Abigail <abigail@fnx.com> says...
++ > Casper Kvan Clausen (ckc@dmi.dk) wrote on MDCCCXLIX September MCMXCIII in
++ > <URL: news:Pine.GSO.3.92.980923163020.6326Z-100000@edb>:
++ > ++ I'm mainly asking this to see what sorts of strange and twisted answers
++ > ++ you guys can come up with, since, given the fickle nature of Usenet, I
++ > ++ doubt any answers will appear in time to make into my code.
++ >
++ > @a = @a [$rot .. $#a, 0 .. $rot - 1];
++ 
++ Benchmark: timing 16384 iterations of Slice, Splice...
++      Slice: 16 secs ( 7.29 usr  0.04 sys =  7.33 cpu)
++     Splice:  0 secs ( 0.63 usr  0.01 sys =  0.64 cpu)


Did you expect otherwise? The question wasn't about efficiency, but
for strange and twisted answers.

Now, if your complaint is that the answer isn't very strange or
twisted, you might have a point.




Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


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

Date: Thu, 24 Sep 1998 16:31:48 +0200
From: Geert Roovers <Geert.Roovers@ericsson.com>
Subject: Security problem
Message-Id: <360A57D4.FD5536C1@ericsson.com>

Hello.

When displaying a plain text database record, I want to display possible
urls as a link in a HTML page. What I do now, is read the fields of a
record. If it starts with "http://", I replace the field contents with

<a href="fieldcontents">fieldcontents</a> 

using a perlscript. This works very nicely.

Problem: The users can fill in new fields (thus: new urls) by
themselves. I think this might deliver a security risk. I'm thinking of
someone entering an url like 

http://www.ourhost.com/cgi-bin/mail.pl?sender=us&adressee=someoneelse&attachment=virus

I realize that the person has to know our mailscript, and how it works
and everything, but still, it might be possible that he found that out
somewhere else on one of our homepages, and does a thing like this.

Is there a way of checking if an url is secure enough to change it into
an link? And how do I do this in perl? Or where can i find how to do
this?

~Geert

If I'm not clear enough, ask me what info you need further.

Geert


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

Date: 24 Sep 1998 14:11:55 GMT
From: "Datanomics" <datanomics@worldnet.att.net>
Subject: URGENT-PLEASE READ!!!
Message-Id: <6udjvb$jeo@bgtnsc02.worldnet.att.net>

Hello,
I have a job opening available ASAP
Skills:Perl,ASP,Oracle HTML,Unix
Pluses:WinNT, worked more on the back-end rather than graphics or front-end
Location:Atlanta
Duration:6 month RTH
Rate:$32/hr
Please contact me ASAP if you are interested!
Shereen George
Technical Recruiter
Datanomics, INc
770-941-1948
fax:770-641-1848





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

Date: 24 Sep 1998 17:10:06 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: koos_pol@nl.compuware.com
Subject: Re: var indirection in a RE
Message-Id: <m3d88llf75.fsf@joshua.panix.com>

koos@stag.nl.compuware.com (Koos Pol) writes:

> I want to use templates for building up html pages dynamically.
> The template contains Perl variables which should be
> expanded. 

There must be something in the air today.

  perlfaq4: "How can I expand variables in text strings?"

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: Thu, 24 Sep 1998 10:29:45 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: var indirection in a RE
Message-Id: <360A6569.2C4FD1B5@email.sps.mot.com>

Koos Pol wrote:
> $title  = "This is the main page";
> $author = "Me";
> $cgi    = 'http://localhost/cgi-bin/process.pl';
> # more unknow variables could follow
> 
> $template = <TEMPLATE>; # e.g. <FORM NAME="Standard" ACTION="{$cgi}"...
> $template =~ s/\{(.*?)\}/$1/g

Try this:
	$template =~ s/\{(.*?)\}/"$1"/gee;

TK :)


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

Date: 24 Sep 1998 14:07:00 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
To: MadMonkey <samblack@earthlink.net>
Subject: Re: weird telnet problem
Message-Id: <6udjm4$jjg3@eccws1.dearborn.ford.com>

In article <3609FDD4.86FED07C@earthlink.net>,
	MadMonkey <samblack@earthlink.net> writes:
>I finally figured out how to use IPC::open2 to talk to telnet. But when
>I connect to a remote host telnet spits this out:
>trying 111.111.11.1....
>connected to mymother.com ------- and then stops. It never gives me the
>login: prompt.
>   Why does it just sit there? When I run it outside the script it works
>fine.

Good job.  You managed to speak to the telnet port, but you still haven't 
managed to speak the telnet _protocol_.  It's waiting for you to say 
something.  Something specific.  Check out the RFC's, source code or a 
good packet sniffer to see what you're missing.

Telnet isn't just:

	Client Workstation   <---- Bytes ----> Server 

It's a little more complicated than that, at least in the beginning.

-- 
+------------------------------------------------------------------------+
|  Clinton A. Pierce    |   "If you rush a Miracle Man,   | http://www.  |
|  cpierce1@ford.com    |     you get rotten miracles"    | dcicorp.com/ |
| fubar@ameritech.net   |--Miracle Max, The Princess Bride| ~clintp      |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*



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

Date: Thu, 24 Sep 1998 14:48:42 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: Where to put cgi-lib.pl
Message-Id: <6udm4a$a95$1@nnrp1.dejanews.com>

In article <906633948.7548@wren.supernews.com>,
  robert.van.der.elst@centric.nl (Robert) wrote:
> I want to know where to put the cgi-lib.pl file ...

Ohhhhhhhhh ... I don't know ...

Please re-phrase that ... and probably in a cgi news group!

Patrick Timmins
$monger{Omaha}[0]


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Thu, 24 Sep 1998 15:57:35 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: Where to put cgi-lib.pl
Message-Id: <PZtO1.659$_c5.6068575@news.shore.net>

Zenin <zenin@bawdycaste.org> wrote:

: 	That said, if you really want/need to run cgi-lib.pl, run this
: 	command:

: 	cp cgi-lib.pl `perl -MConfig -e 'print $Config{sitelib}'`

Or just put it in the same directory with your script.

--Art

-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
                  http://www.agitators.com/calendar/
--------------------------------------------------------------------------


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

Date: Thu, 24 Sep 1998 10:39:40 -0500
From: John Warner <support@acuity.com>
Subject: Win32 and OLE/ADO
Message-Id: <360A67BB.E71E6A7A@acuity.com>

I've been searching through the FAQs and all the on-line
documentation I can find but I haven't been able to locate
any examples of using the Win32 OLE package with a
database.  All the examples seem to be for working with
Excel.  In particular, I interested in using OLE and ADO to
retrieve user login information from a MS Access 97
database.  I have installed the MS Data Access Components
SDK and have been reading through their docs but they have
limited examples for VB.  Does anybody have links to good
on-line OLE DB documentation?





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

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 3813
**************************************

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