[10167] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3760 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 19 15:07:15 1998

Date: Sat, 19 Sep 98 12:00:18 -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           Sat, 19 Sep 1998     Volume: 8 Number: 3760

Today's topics:
        "use lib" usage <bruceh@interaccess.com>
    Re: /etc/passwd file <eashton@bbnplanet.com>
    Re: any way to encrypt my script? bitnut1@my-dejanews.com
    Re: any way to encrypt my script? bitnut1@my-dejanews.com
    Re: any way to encrypt my script? <dgris@rand.dimensional.com>
    Re: any way to encrypt my script? <tchrist@mox.perl.com>
    Re: any way to encrypt my script? <egwong@netcom.com>
        Code: Help() function and printing embedded POD (Jari Aalto+mail.perl)
    Re: Concatenation of variable names <tobez@plab.ku.dk>
    Re: Enumerating Properties and Methods (Mark-Jason Dominus)
    Re: Help with file test operator problem <jdw@dev.tivoli.com>
    Re: How do I implement perl with javascript or vice ver <samwang@freewwweb.com>
    Re: Interesting method technique: Default $self (Mark-Jason Dominus)
        LWP::UserAgent / HTTP::Headers error <jbattikha@highsynth.com>
    Re: Perl & Java - differences and uses <borg@imaginary.com>
    Re: Perl & Java - differences and uses <uri@sysarch.com>
    Re: Perl & Java - differences and uses <pats@acm.org>
    Re: Perl & Java - differences and uses (Larry Wall)
    Re: Perl & Java - differences and uses (Alastair)
    Re: PLESE HELP ME!!! (Matthew Bafford)
    Re: what's wrong with win32 perl ? <nguyend7@msu.edu>
    Re: Where is perldelta that describes new features in 5 (Larry Rosler)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Sat, 19 Sep 1998 11:53:23 -0500
From: Bruce Hodo <bruceh@interaccess.com>
Subject: "use lib" usage
Message-Id: <3603D372.7EB9E5EF@interaccess.com>

I'm getting the following error:
Perl runtime error (interpreter rc=2)

       Contents of STDERR channel:
       install_driver(mysql) failed: Can't find loadable object for
module DBD::mysql in @INC
(/export/home/cmagic/mysql-3.21.33/perl/Mysql-modules/lib
/export/home/cmagic/perllib/lib/site_perl/DBI
/export/home/cmagic/site/docs /opt/perl5.004_01/lib/sun4-solaris/5.00401
/opt/perl5.004_01/lib /opt/perl5.004_01/lib/site_perl/sun4-solaris
/opt/perl5.004_01/lib/site_perl .) at (eval 1) line 2

       Perhaps DBD::mysql was statically linked into a new perl binary.
       In which case you need to use that new perl binary.
               DBI::install_driver('DBI', 'mysql') called at
/opt/perl5.004_01/lib/site_perl/DBI.pm line 237
               DBI::connect('DBI', 'DBI:mysql:CVN:localhost', '', '',
'HASH(0xd1450)') called at myfile.cgi line 7
-------
Here are the first lines of the procedure:

#!/export/home/cmagic/bin/eperl
<?
use lib '/export/home/cmagic/perllib/lib/site_perl/DBI'; # tell perl
where to find DBI
use DBI;

use lib '/export/home/cmagic/mysql-3.21.33/perl/Mysql-modules/lib'; #
tell perl where to find Mysql.pm

 my $dbh = DBI->connect('DBI:mysql:CVN:localhost', '','',
 { PrintError =>0}) || die $DBI::errstr;
!>//
------

The DBI.pm module is located in
/export/home/cmagic/perllib/lib/site_perl.
The DBD.pm module is located in
/export/home/cmagic/perllib/lib/site_perl/DBI.

What am I doing wrong, or what do I need to do?
--
                 Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
     ==Providing unique vacation information on the World Wide Web==
       For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares

                              And Now Offering Travel Auctions!
=============== Visit us at http://getawaynet.com ===============




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

Date: Sat, 19 Sep 1998 17:26:12 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: /etc/passwd file
Message-Id: <3603E6CE.831F80FD@bbnplanet.com>

Christian Brink wrote:

> 2. The procedure of removing all files and references associated with a UID
> and username can be daunting task and should not be handled by inexperienced
> admins. (yes I have removed users usually by hand)

Well, how else are you to learn than to make a mistake? Obviously this
is a very lazy beginner who perhaps could use to learn how to screw-up
and then extract himself from that. Some of my best experience comes
from hubris and laziness which supposedly makes a fine programmer but
will always bite the behind of an admin. Besides, what is the point of
having 1 or 100 useless disabled accounts on a machine? I like my house
tidy and that is what nice Perl scripts are for so you don't have to do
it 'by hand'.

> IOW yes it was a halfassed answer but, that is what I had planned.

I think you merely confused the issue...it is a style used by many
amateurs but way ahead of where this guy is.

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: Sat, 19 Sep 1998 16:50:45 GMT
From: bitnut1@my-dejanews.com
Subject: Re: any way to encrypt my script?
Message-Id: <6u0nd5$pfq$1@nnrp1.dejanews.com>



Mr. Schutz,

Thanks for a mature answer!

B.N.



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


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

Date: Sat, 19 Sep 1998 16:55:47 GMT
From: bitnut1@my-dejanews.com
Subject: Re: any way to encrypt my script?
Message-Id: <6u0nmj$q0i$1@nnrp1.dejanews.com>


> abigail@fnx.com wrote:
> What makes you think that Perl code isn't compiled before executed?

I have no choice but to recommend remedial reading lessons
and lessons in the distinction between a compiler and an
interpreter.

B.N.

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


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

Date: Sat, 19 Sep 1998 17:28:08 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: any way to encrypt my script?
Message-Id: <6u0omb$3ti$1@rand.dimensional.com>

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

In article <6u0nmj$q0i$1@nnrp1.dejanews.com>
bitnut1@my-dejanews.com wrote:

>I have no choice but to recommend remedial reading lessons
>and lessons in the distinction between a compiler and an
>interpreter.

I have no choice but to recommend rereading your perl
documentation set.  Pay particular attention to the
difference between compile time effects and runtime
effects.

Come back when you've found a clue.

*plonk*

dgris
-- 
Daniel Grisinger          dgris@perrin.dimensional.com
`By about halfway through I was beginning to guess the 
ending, but it still kind of surprised me.'
      David Hatunen, talking about the movie Titanic


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

Date: 19 Sep 1998 17:29:42 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: any way to encrypt my script?
Message-Id: <6u0pm6$f8r$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, bitnut1@my-dejanews.com writes:
:> abigail@fnx.com wrote:
:> What makes you think that Perl code isn't compiled before executed?
:
:I have no choice but to recommend remedial reading lessons
:and lessons in the distinction between a compiler and an
:interpreter.

Abigail clearly knows much more about what's being discussed here than
you do.  Perhaps you'd like to retake those programming languages courses
before you embarrass yourself again.  If you don't think Perl compiles
a program before it executes it, you need to pitch your degree.

--tom
-- 
    "You can't have filenames longer than 14 chars.  
     You can't even think about them!"
        --Larry Wall in Configure from the perl distribution


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

Date: Sat, 19 Sep 1998 17:36:20 GMT
From: Eric Wong <egwong@netcom.com>
Subject: Re: any way to encrypt my script?
Message-Id: <egwongEzJKwK.LtI@netcom.com>

bitnut1@my-dejanews.com wrote:
: > abigail@fnx.com wrote:
: > What makes you think that Perl code isn't compiled before executed?
:
: I have no choice but to recommend remedial reading lessons
: and lessons in the distinction between a compiler and an
: interpreter.

  http://www.perl.com/CPAN-local/doc/FMTEYEWTK/comp-vs-interp.html



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

Date: 19 Sep 1998 20:52:18 +0300
From: jari.aalto@poboxes.com (Jari Aalto+mail.perl)
Subject: Code: Help() function and printing embedded POD
Message-Id: <ptryarg3s8d.fsf@olkikukka.i-have-a-misconfigured-system-so-shoot-me>


	Hi,

	I'd like to hear comments about the Help() function skeleton I've
	used. Do you find anything to improve or note here? It is assumed
	that

		English.pm	is loaded
		$LIB		refers program name in question

	Is there somewhere explained the corrcet order of HEADING somewhere?
	Now I've just used the ones I've seen in man pages and in other
	perl programs.

	The above is skeleton, not from real program.

	jari



            # ***************************************************************
            #
            #   DESCRIPTION
            #
            #       Print help and exit.
            #
            #   INPUT PARAMETERS
            #
            #       $msg    [optional] Reason why function was called.
            #
            #   RETURN VALUES
            #
            #       none
            #
            # ***************************************************************

            =pod

            =head1 NAME

            @(#) program - Does something nice and usefull

            =head1 SYNOPSIS

            program [B<-a>|B<-z>|B<-l>|B<-v>|B<-U>] [B<-s>|B<-r>|B<-u>] file

            program B<-T> [B<-F>] file

            program B<-V> file

            =head1 OPTIONS

            =over 4

            =item B<--install>

            Install something

            =item B<--sort>

            Sort alphabetically by subroutine names.

            =item B<--help>

            Print help

            =item B<--Version>

            Print contact and version information

            =back

            =head1 DESCRIPTION

            The I<program> command interprets given configuration file and
            installs new version iof YYY by replacing the old entry with the
            updated one

            To run the default installation use:

                % program --install

            =head1 EXAMPLES

            =head1 ENVIRONMENT

            The environment variable B<PROGRAM_OPTS> can be set to a
            string containing options for program

            =head1 FILES

            =head1 BUGS

            =head1 SEE ALSO

            ps(1) top(1) lp(1) mpage(1)

            =cut

            sub Help (;$)
            {
                my $id  = "$LIB.Help";
                my $msg = shift;  # optional arg, why are we here...

                local ( $ARG,  *F);

                #       Read first line of our perl script to find out the Perl
                #       interpreter in use.

                open F, $0   or die "$0 $ERRNO";
                $ARG = <F>;
                close F;

                if ( m,(/[^ \s]+), )    # The perl interpreter --> $1
                {
                    system "$1 -MPod::Text -e 'pod2text shift; exit' $0";
                    print  "$id: $msg\n" if defined $msg;
                }
                else
                {
                    warn "Can't detect perl, Run:\n  pod2text $0\n"
                }

                exit 1;
            }


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

Date: 19 Sep 1998 19:19:32 +0200
From: Anton Berezin <tobez@plab.ku.dk>
Subject: Re: Concatenation of variable names
Message-Id: <86zpbw3tqz.fsf@lion.plab.ku.dk>

dragons@scescape.net (Matthew Bafford) writes:

> In article <35FEF12D.9A6A0B2C@genome.stanford.edu> on Tue, 15 Sep 
> 1998 15:58:53 -0700, Gavin Sherlock 
> (sherlock@genome.stanford.edu) pounded in the following text:
> => Hi,
> => 	This may be a dumb question, as I'm a Perl newbie, but I want to write
> => something like:
> => 
> => for ($i=1; $i<=10; $i++){
> => 	$fred$i=$somearray[$i];
> => }
> 
> Nice try, but no such luck.  Like Tom Christiansen said in his 
> post, you really should be using an array.  But, since that's 
> said, I'll fix your code...
> 
> for ( 1 .. 10 ) # or for ( $_ = 1; $_ <= 10; $_++ ) up to you
> {
>     eval "\$fred$_ = $somearray[$i]";
> }

I'm afraid, this ``fix'' is
a) incorrect:  this should be $somearray[$_], not $somearray[$i];
b) dangerous:
   what if before the loop you've got

   $somearray[1] = '`rm *`';

Please don't fix things in such a way.  Thank you.

-- 
Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen

Figure 4  shows memory usage for a script (program)  written in the Perl
scripting language. This program processes a file of string data. (We're
not sure exactly what it is doing with the strings, to be honest;  we do
not really understand this program.)
                  -- P.R. Wilson, M.S. Johnstone, M. Neely, and D. Boles


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

Date: 19 Sep 1998 14:17:31 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Enumerating Properties and Methods
Message-Id: <6u0sfr$p9t$1@monet.op.net>

In article <6u0m6l$98s@news-central.tiac.net>,
Jay Guerette <JayGuerette@pobox.com> wrote:
>how could I get a list of the methods and properties available to me from
>this class?

In all seriousness:  You read the documentation.  

Perhaps you meant `how can my program get such a list?'  But that's
useless, because even if your program had a list of methods, it
wouldn't know what the methods were for, so what good would the list
be?

>or access a property like this:
>
>$foo->bar->{'prop'}="gnu";

Here there is a solution, which I will not tell you, because I suspect
that whatever you are really trying to accomplish, this isn't going to
help very much.  I urge you to explain what you are really trying to
accomplish; there is probably a better solution available.

For example, suppose what you really wanted to know was whether there
was a `bar' method defined on object $foo.  Then you could use
$foo->can('bar'), which would tell you, and that would be better than
getting a list of methods and looking for `bar'.






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

Date: 19 Sep 1998 10:49:12 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: Help with file test operator problem
Message-Id: <ob4su4umpz.fsf@goliath.dev.tivoli.com>


"Knight" <843943n34@knight_storm@usa.net.sprynet.com> writes:
> while ($testvar < $numberfiles)
>    {$file = @mainfiles[$testvar];

oops, @mainfiles[$testvar] is a slice, you probably wanted a scalar

$file = $mainfiles[$testvar];

>     if (-f $file)
>        {@mainfiles[$testvar] = ("delete");

here you're assigning to a slice, probably not what you want.

$mainfiles[$testvar] = "delete";

>        }
>     $testvar = ($testvar + 1);
	
$testvar++ is nicer...

>    }
> 
> $testvar = 0;
> while ($testvar < $numberfiles)
>    {print @mainfiles[$testvar];

print "$mainfiles[$testvar]\n";

>     print "\n";
>     $testvar = ($testvar + 1);
>    }

you might want to look at the docs for foreach and join, your loops
could look something more like this:

foreach $file (@mainfiles) {
  $file = "delete" if -f $file;
}

print join("\n",@mainfiles);

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com


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

Date: Sat, 19 Sep 1998 12:35:39 -0500
From: Sam Wang <samwang@freewwweb.com>
Subject: Re: How do I implement perl with javascript or vice versa?
Message-Id: <3603EB6B.EAE73996@freewwweb.com>

oops. that should be onUnload="window.location='logout.cgi'" or
onUnload="document.location='logout.cgi'" depending on whether you're using frames
or not.

nospamno_adms1@cts.com wrote:

> onUnload= will only execute JavaScript code.  If you absolutely what a
> cgi script to remove the cookie, try something like:
>
> <script language=JavaScript>
> <!--
> function logout() {
>   if (logoutOK) {
>     logoutWin = window.open("logout.cgi", "logout",
> "toolbar=no,status=no,location=no");
>   }
> }
> //-->
> </script>
>
> Then: <BODY onUnload="logout();">  Remember that all your links and
> correct "exit" points should set logoutOK to false.
>
> You will want to make sure that logout.cgi prints the JavaScript code
> self.close to close this little window just created.
>
> OR - You can check out http://www.dynamicsex.com/index.html for
> JavaScript code to create/remove cookies.



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

Date: 19 Sep 1998 12:20:21 -0400
From: mjd@Op.Net (Mark-Jason Dominus)
Subject: Re: Interesting method technique: Default $self
Message-Id: <6u0lk5$onh$1@monet.op.net>

In article <1dfk5a4.6dpy0e1jzjy6wN@slip166-72-108-61.ny.us.ibm.net>,
Kevin Reid <kpreid@ibm.net> wrote:
>Mark-Jason Dominus <mjd@plover.com> wrote:
>
>>       package DB;
>
>What's this code doing in the debugger package?

I was programming in a universe where `debug' is spelled differently.

>  } else {
>    return $DObj = $something->new;
>  }

This defeats the purpose of having DObj at all.  Maybe you meant to
write this:

	return $DObj || $DObj = $something->new;

One problem with both of our approaches is that they don't work if
there are two sibling subclasses that both inherit the `instance'
method.  For example, suppose A and B both inherit.  Then

	A->instance

creates and installs an instance of A into $DObj, and

	B->instance

returns it.  But it should have returned an instance of B, not an
instance of A.  Oops!

A solution might look like:

	{ my %instances;

	  sub instance {
	    my $s = shift;
	    return $s if ref $s;
	    return $instances{$s} if $instances{$s};
	    $instances{$s} = $s->new();
	  }
	}

Then A->instance creates an instance of A and installs it in
$instances{A}.  B->instance looks in $instances{B}, not $instances{A},
so that is all right.

On the other hand, if A is a subclass of AA, then $instance->AA does
not return $instance{A}.  Whether it should or not probably depends on
the application.  But I can't think of a good way to get it to do that
if that was what was wanted.  Does anyone have any suggestions?

(Note:  The word `good' in the previous paragraph means `without
manually traversing the @ISA tree.')


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

Date: Sat, 19 Sep 1998 14:39:28 -0400
From: Jihad Battikha <jbattikha@highsynth.com>
Subject: LWP::UserAgent / HTTP::Headers error
Message-Id: <3603FA60.3D9567C3@highsynth.com>

I'm getting the following error when using LWP::UserAgent -

Can't locate object method "protocol" via package "HTTP::Headers"

Even the simplest LWP::UserAgent script won't work:

-- (fails) ---
#!/usr/bin/perl5
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
$ua->agent("Perl-LWP Test");
my $req = new HTTP::Request 'GET' => 'http://www.microsoft.com/';
my $res = $ua->request($req);
if ($res->is_success) {
  print $res->content;
} else {
  print "Error: ".$res->code." ".$res->message;
}
------

Yet, the following LWP::Simple script works fine:

--- (works) ---
#!/usr/bin/perl5
use LWP::Simple;
my $page = get 'http://www.microsoft.com/';
print $page;
------

I asked the server admin to check up on the errors and he said:

> I have installed the UserAgent package.
> 
> You can try it now.  Just to let you know, I have
> never had any luck getting this particular package
> to work.

which wasn't very helpful.  I don't think he knows how to investigate
the problem and I don't have browse/read access on the server where
the modules are located.

The server OS is:
BSDI BSD/OS 3.1 Kernel #1: Tue Sep  1 18:24:25 EDT 1998

The web server (if it matters) is:
Apache 1.3

Does anyone have any ideas as to what direction I could take to try to
solve this issue?  I can use the LWP::Simple module for now to
prototype my work but I need to have control over the header responses
found in the HTTP::UserAgent module which is choking.

I'm running Perl5 on WinNT locally here to do testing before I upload
and my LWP::UserAgent module is working fine.  My HTTP::Headers module
makes no mention of a "protocol" object yet it's working fine here. 
What does that error mean?  I really hope this isn't an OS-specific
glitch...

~jihad

-- 
<>>>===========================================================<<<>
 Jihad Battikha <jbattikha@highsynth.com> http://www.highsynth.com
 -=< graphics . 2d/3d animation . illustration . web authoring >=-
 -----------------------------------------------------------------
 PGP: http://www.highsynth.com/jihad/pgp.htm
 - fingerprint: 9B5E 0484 0D88 6454 380B  964D E9B7 7A58 15C0 CAD7
 - expires: 1/1/1999
<>>>===========================================================<<<>
 Before sending me commercial e-mail, the sender must first agree
 to my LEGAL NOTICE located at: http://www.highsynth.com/sig.html.
<>>>===========================================================<<<>


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

Date: Sat, 19 Sep 1998 17:10:27 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <7ARM1.876$Ge.2267862@ptah.visi.com>

In comp.lang.java.programmer Larry Wall <larry@kiev.wall.org> wrote:
: In article <bOPM1.856$Ge.2187567@ptah.visi.com>,
: George Reese  <borg@imaginary.com> wrote:
:>I have already stated that freedom has no place in programming.  Now
:>you may disagree with it, and I have certainly provided support for
:>that assertion.  It therefore makes no sense to come back with freedom
:>to counter that argument.  You may want to try explaining why a
:>programmer should have freedom.

: Because the programmer knows what he or she wants to optimize for, and
: the language designer doesn't.  Plus, it's more fun.

Vanishingly few programmers actually have the skill to know what they want to
optimize for in a manner inconsistent with structured language
design.  I certainly cannot think of a meaningful exception.

More to the point, "programmer freedom", while it may be fun for the
programmer, is the freedom to escape application design constraints
MUCH MORE SO than it is to optimize beyond the foresight of the
language designers.  On large scale, multi-developer projects, such
freedom is dangerous.

-- 
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: 19 Sep 1998 13:14:58 -0400
From: Uri Guttman <uri@sysarch.com>
To: George Reese <borg@imaginary.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <x7vhmkvxbh.fsf@sysarch.com>

>>>>> "GR" == George Reese <borg@imaginary.com> writes:

  GR> I have already stated that freedom has no place in programming.
  GR> Now you may disagree with it, and I have certainly provided
  GR> support for that assertion.  It therefore makes no sense to come
  GR> back with freedom to counter that argument.  You may want to try
  GR> explaining why a programmer should have freedom.

ok, then use just cobol for all you programs. and only insertion
sorts. no regexes since you can write parsers by hand. no hashes since
you can do linear lookups. this is what no freedom in programming is
about.

think about what you are saying. you use your programming freedom with
every design and coding decision you make. programming is as much art as
science or engineering. there is freedom in naming things (vars, subs,
files, etc), freedom in formatting (at least in perl :-), freedom in
choosing an idiom in the language, freedom in algorithm and system
architecture and design.

if you think programming needs no freedom, then all programs can be
generated automatically. use you fantastic insight, write the
autoprogramming program we all want and put u$hit out of business.

even then, how would you describe to that meta-program what you want to
be done? use natural language? wait 300 years until science fiction
computers come into being? programming is the art of being %100
unambiguous about what you want done. there are NO bugs that aren't
created by a human person. the machine blindly obeys your minutest
instruction.

so don't say you don't need freedom when you must have it, you use it and
you don't even know it.

get a clue about what programming really is. you obviously think you
know it but you don't. it is not following some fixed set of rules to
solve each problem the same way (no freedom, remember!).

uri


-- 
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: 19 Sep 1998 10:49:32 PDT
From: Patricia Shanahan <pats@acm.org>
Subject: Re: Perl & Java - differences and uses
Message-Id: <3603EE30.2DDB2AE4@acm.org>

George Reese wrote:
> 
> In comp.lang.java.programmer Larry Wall <larry@kiev.wall.org> wrote:
> : In article <bOPM1.856$Ge.2187567@ptah.visi.com>,
> : George Reese  <borg@imaginary.com> wrote:
> :>I have already stated that freedom has no place in programming.  Now
> :>you may disagree with it, and I have certainly provided support for
> :>that assertion.  It therefore makes no sense to come back with freedom
> :>to counter that argument.  You may want to try explaining why a
> :>programmer should have freedom.
> 
> : Because the programmer knows what he or she wants to optimize for, and
> : the language designer doesn't.  Plus, it's more fun.
> 
> Vanishingly few programmers actually have the skill to know what they want to
> optimize for in a manner inconsistent with structured language
> design.  I certainly cannot think of a meaningful exception.

How about when I'm doing performance testing, and want to make a
processor do EXACTLY the memory accesses I want to measure? The
wrappings for processing parameters, measuring time, and reporting
results can be structured and written in e.g. C++. The guts have to be
assembly language, or C that is so close to assembly language that I
can predict exactly what the compiler will do with it, and cannot
contain procedure calls or be at risk of losing time to garbage
collection.

> More to the point, "programmer freedom", while it may be fun for the
> programmer, is the freedom to escape application design constraints
> MUCH MORE SO than it is to optimize beyond the foresight of the
> language designers.  On large scale, multi-developer projects, such
> freedom is dangerous.

At another level, I often need to write very simple text processing
programs that will be used once for ad-hoc analysis of a text file and
then thrown away. For this type of program the ability to do simple
text processing quickly and simply, with good regular expression
handling, is far more important than program structure.

The needs of large scale, multi-developer projects are critical when
one is writing code that is part of a large scale multi-developer
project. They are irrelevant when writing a 30 line single-writer
single-use program.

When it comes to programming language selection I believe in keeping a
good stable and picking the horse for the course.

Patricia


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

Date: 19 Sep 1998 10:46:58 -0700
From: larry@kiev.wall.org (Larry Wall)
Subject: Re: Perl & Java - differences and uses
Message-Id: <6u0qmi$iu5@kiev.wall.org>

In article <7ARM1.876$Ge.2267862@ptah.visi.com>,
George Reese  <borg@imaginary.com> wrote:
>I certainly cannot think of a meaningful exception.

You really shouldn't give people straight lines like that.  It's just
too tempting to swat it out of the park.

Larry


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

Date: Sat, 19 Sep 1998 17:55:21 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: Perl & Java - differences and uses
Message-Id: <slrn707vnd.4m.alastair@calliope.demon.co.uk>

George Reese <borg@imaginary.com> wrote:
>In comp.lang.java.programmer Larry Wall <larry@kiev.wall.org> wrote:
>: Because the programmer knows what he or she wants to optimize for, and
>: the language designer doesn't.  Plus, it's more fun.
>
>Vanishingly few programmers actually have the skill to know what they want to
>optimize for in a manner inconsistent with structured language
>design.  I certainly cannot think of a meaningful exception.

Come on man, this is getting ridiculous! In other words, because you think there
are few people who can take advantage of this 'freedom', you want to eliminate
it. So, stick to your 'bondage and discipline' - no one cares what you think!

-- 

Alastair
work  : alastair@psoft.co.uk
home  : alastair@calliope.demon.co.uk


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

Date: Sat, 19 Sep 1998 13:08:47 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: PLESE HELP ME!!!
Message-Id: <MPG.106d7261b6c301079896ad@news.south-carolina.net>

In article <1dfkv67.becbjqmhz9h6N@bay1-201.quincy.ziplink.net> on 
Sat, 19 Sep 1998 01:18:12 -0400, Ronald J Kimball 
(rjk@coos.dartmouth.edu) pounded in the following text:
=> Matthew Bafford <dragons@scescape.net> wrote:
=> 
=> > => >The code below will return the first 180 chars from $INPUT{'update'},
=> > => >but i need it to return all chars before this appears: </P>
=> 
=> > $_ = substr $Text, index($Text, "</P>");
=> 
=> Woops, that one doesn't quite work.  I think you meant:
=> 
=> $_ = substr $Text, 0, index($Text, "</P>");
=> 
=> But only if $Text actually contains "</P>".  :-)
=> 
=> 

Whoops! :)  One of the few times I didn't cut & paste, and it 
gets me. :)

Thanks!

--Matthew


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

Date: 19 Sep 1998 18:21:17 GMT
From: Dan Nguyen <nguyend7@msu.edu>
Subject: Re: what's wrong with win32 perl ?
Message-Id: <6u0smt$h0f$1@msunews.cl.msu.edu>

In comp.lang.perl.misc John Smith <bgates@microsoft.com> wrote:
: I still couldn't compile modules under win32.
: So far, I have tried four different versions of perl5,
: include ActiveState perl. They all complained about
: xsubpp. Is it my windows setting or the unsolved problem of win32 perl ?

Do you have a standard GNU C-compiler?
The problem is your compiler won't compile the C code that's required
for XS based modules.  Remember that Perl works best on Unix machines,
but you can find free GNU C-compilers for win32's.

-- 
           Dan Nguyen            | There is only one happiness in
        nguyend7@msu.edu         |   life, to love and be loved.
http://www.cse.msu.edu/~nguyend7 |                   -George Sand



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

Date: Sat, 19 Sep 1998 09:37:26 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Where is perldelta that describes new features in 5.005?
Message-Id: <MPG.106d7d9fb526a13498986f@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <ptr3e9o5cmv.fsf@olkikukka.i-have-a-misconfigured-system-so-
shoot-me> on 19 Sep 1998 18:46:16 +0300, Jari Aalto+mail.perl 
<jari.aalto@poboxes.com> says...
 ...
> 	Would someone send me the perldelta of 5.005 or show me
> 	a pointer to it. No 5.005 tgz pointer thank you :-)

<URL:http://www.perl.com/CPAN-local/doc/manual/html/pod/perldelta.html>

Why couldn't you find it yourself?

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

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

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