[6697] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 322 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 17 08:07:34 1997

Date: Thu, 17 Apr 97 05:00:45 -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, 17 Apr 1997     Volume: 8 Number: 322

Today's topics:
     Re: "Dummies" book any good? <dehon_olivier@jpmorgan.com>
     Re: [Q] How to capitilize beginning of words <AFilip@impaq.com.pl>
     Re: associated arrays (ALASTAIR AITKEN CLMS)
     Re: auto refreshing form (ALASTAIR AITKEN CLMS)
     Re: Beginners :: debugger (Was: "Dummies" book any good (Mike Stok)
     Re: C++Builder means Future. <john.allen@ie.ibm.com>
     Re: Correct timelines [was: Reply to Ousterhout's reply (David Combs)
     display local directory (Darren Westlake)
     Re: gethostname? (Andy Wardley)
     High Scores Script for Shockwave Game <carlos_pi@in.form.co.uk>
     Re: Number of Array Elements <AFilip@impaq.com.pl>
     Re: Ousterhout and Tcl lost the plot with latest paper <mcmanr@nytrdc058.eq.gs.com>
     Palindromic words search??? <jong@mrc-lmb.cam.ac.uk>
     Re: PERL 4.036 for Solaris 2.5 (Mike Stok)
     Re: PERL BUG: ([]) x 3 does not work correctly (Mike Stok)
     Re: perl syntax error (David Alan Black)
     Re: Reading One Character at a time (Andy Wardley)
     Re: References question !!! (David Alan Black)
     rsjemail.cgi (cgi post for e-mail) - help needed to und <C.Dumont@mercure.umh.ac.be>
     Scripting vs. Systems (Daniel Wang)
     sybperl - rpc problem <daniel.roitman@gs.com>
     Re: Technical Support The Guy
     Re: Transliterate from a pattern? (ALASTAIR AITKEN CLMS)
     Re: Transliterate from a pattern? (ALASTAIR AITKEN CLMS)
     Re: Unix and ease of use  (WAS: Who makes more ...) <nospam_ian.johnston@ubs.com>
     Re: Unix and ease of use  (WAS: Who makes more ...) <graham.hughes@resnet.ucsb.edu>
     XS and C structures... (Paul Kmiec)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 17 Apr 1997 09:41:33 +0100
From: Olivier Dehon <dehon_olivier@jpmorgan.com>
Subject: Re: "Dummies" book any good?
Message-Id: <njzbu7ehwhu.fsf@jpmorgan.com>

abigail@fnx.com (Abigail) writes:

> 
> On Wed, 16 Apr 1997 10:51:40 GMT, Jonathan Peterson wrote in
> comp.lang.perl.misc <URL: news:3354ab99.3478663@news.sonnet.co.uk>:
> ++ 
> ++ Explaining to a real beginner that:
> ++ 
> ++ if ($a == 1) {
> ++ 	print ("Whee!");
> ++ 	}
> ++ 
> ++ is the same as
> ++ 
> ++ $a || print ("Whee!");
> ++ 
> ++ is not something that you can do in a few sentences. More like a few
> ++ chapters.
> 
> 
> Ok, then what do you do if the beginner set $a to 2 and complains it
> prints "Whee" in the second case and not in the first?
> 

Oops !
If the beginner sets $a to 2, it won't print "Whee!" in any case !
So if he complains it does, he is probably trying to test your
own knowledge of Perl ;-)

I hope that not too many beginners are reading this thread, because
they will get really confused !

P.S.:
>From the perlop manpage:
Binary "||" performs a short-circuit logical OR operation.  That is, if
the left operand is true, the right operand is not even evaluated.  Scalar
or list context propagates down to the right operand if it is evaluated.

Olivier Dehon.


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

Date: Thu, 17 Apr 1997 12:11:15 +0200
From: Andrew Filip <AFilip@impaq.com.pl>
Subject: Re: [Q] How to capitilize beginning of words
Message-Id: <3355F743.1AFEF2C9@impaq.com.pl>

$WORD = "\u\L$WORD" ;

-- 
AFilip@impaq.com.pl

common sence is uncommon


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

Date: 17 Apr 1997 11:05:58 GMT
From: zpalastair@unl.ac.uk (ALASTAIR AITKEN CLMS)
Subject: Re: associated arrays
Message-Id: <5j506m$656@epsilon.qmw.ac.uk>

In article <5j2sls$fga@epsilon.qmw.ac.uk>, zpalastair@unl.ac.uk (ALASTAIR AITKEN CLMS) writes:
>#! /usr/local/bin/perl	# at a guess
>
>require "5.003";

whoops :-)

require 5.003;

no quotes.

Alastair.


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

Date: 17 Apr 1997 11:25:25 GMT
From: zpalastair@unl.ac.uk (ALASTAIR AITKEN CLMS)
Subject: Re: auto refreshing form
Message-Id: <5j51b5$6nn@epsilon.qmw.ac.uk>

In article <eyoung-1604971324110001@bopc3.ncsa.uiuc.edu>, eyoung@ncsa.uiuc.edu (Ed Young) writes:
>I have an html form for a semi chat/guestbook. After you submit to the
>form, the information is placed on the same page. Problem is in order to
>see the updated form the end user has to reload/refresh their browser. How
>can I code the page so that when they hit the submit button...it adds to
>the page and then automaticly reloads the page. Thanks!

The submit button should also send something to the browser, if it doesn't the
browser should popup "Document contains no data".  code the html page into the
script (is it perl .. this is comp.lang.perl.misc after all) and the submit
button should always send out the latest version to the browser.

This is a CGI question, not perl.

Alastair.


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

Date: 17 Apr 1997 11:17:56 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Beginners :: debugger (Was: "Dummies" book any good?)
Message-Id: <5j50t4$fl4@news-central.tiac.net>

In article <tzn2qybj7e.fsf_-_@zinger.adp.wisc.edu>,
Don Thomson  <thomson@zinger.adp.wisc.edu> wrote:

>By the way, we buy each of them a copy of your book and use that as the
>basis for the course, with a few Perl5 addendums thrown in.  The only
>course prerequisite is prior experience watching the Flinstones....  ;-)

I'd be interested to know what addenda you throw in as Learning Perl seems
to cover the core concepts of perl which are applicable to both 4.xxx and
5.xxx reasonably well.

By core concepts I mean stuff as basic as variables and flow control...

As perl 5.xxx becomes more pervasive than perl 4.xxx I would have liked
some stuff up front about what modules buy you (e.g. the more OO ways of
dealing with file & directory handles) so that the idea of objects and
object methods can be demonstrated without explaining how it works (after
all we happily expect people to use a TV or telephone without knowing or
caring about its internal workings...) and maybe some mention of the
ability to do more complex data structures (maybe just 2d arrays?) and
come of the more useful modules as well as the more cosmetic chop/chomp
and => in place of , .  

I'm just interested as I recommend the book to co-workers but feel that
its age shows and sometimes muse about the minimal set of changes which
would make it a really good modern introduction to perl now that we know
what perl 5.xxx contains (to date, by and large :-) and the perspective
has shifted to a point where code like

  #!/usr/bin/perl -w

  use strict;
  use vars qw/@result/;

  sub somefunc ($$$);

  foreach my $row (0 .. 9) {
    foreach my $col (0 .. 9) {
      $result[$row][$col] = somefunc 'foo', $row, $col;
    }
  }

  ...

shouldn't be considered unusual (but it may be worth commenting that perl
4 gives you less opportunity to use data structures easily ;-)

I'm *not* knocking the book, and am just intersted in what other people
feel it misses (if anything) when used as a tool to introduce perl 5.

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: Thu, 17 Apr 1997 10:35:53 +0100
From: John Allen <john.allen@ie.ibm.com>
Subject: Re: C++Builder means Future.
Message-Id: <3355EEF8.3BA1@ie.ibm.com>

Frank C. Earl wrote:
> 
> On Wed, 16 Apr 1997 16:46:45 -0700, 34110s96@student.csi.cuny.edu
> wrote:
> 
> >I just got C++Builder and I have never seen a powerful RAD tool like
> >this  one.  Forget about the Visual Crap.  C++Builder is the King of the
> >Hill and not Marketing hype of Microsoft.
> 
> And if only it was on Linux, we'd be in hog-heaven.  Thing is, it's on
> MS-Windows.
> 
> --

If only it was built using Star Division's StartView then it could be on
all
platforms!

-- 
-------------------------------------------------------------------------------
Disclaimer: IBM are not responsible for anything I say or do in a public
fora.
-------------------------------------------------------------------------------


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

Date: Thu, 17 Apr 1997 11:24:24 GMT
From: dkcombs@netcom.com (David Combs)
Subject: Re: Correct timelines [was: Reply to Ousterhout's reply ]
Message-Id: <dkcombsE8s50o.5DA@netcom.com>

In article <AF734804-B1B9E@128.143.7.209>,
>...
>...
>adoption showed the hunger for something better. I used Ratfor 
 ... ratfor and books like Software Tools ...


 ...

HOORAY for Software Tools, both the book and the
Lawrence Berkeley Labs (up hill from Berkeley) software system that
implemented it all for the vax, and the effort
at U Ariz that moved it to the DEC-10 & 20!

Had a "cc", macro preprocessor, grep, sh, etc, etc.

At my site we (well, a consultant who REALLY knew
his stuff) added a bunch of stuff to it.  Like Recursion.

You'd write this recursive code much as in algol etc,
the macro processor would see it and generate special
code to be seen only by the ratfor "compiler", which
would then generate humongous computed go-to, etc, etc,
maintain stacks for args, locals, etc.

Turned a compu-serv (then t/s company) dec-10 into
an incredible workhorse -- same later for 2060 elsewhere.

Thanks to dave hanson then at Ariz, debbie & others at LBL,
and (of course!) Brian K for the book(s).  (Oh, please write
some more, pretty please?).

Man, did they advance the ease of getting things done
via computer!


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

Date: Thu, 17 Apr 1997 08:58:29 GMT
From: darren@spiritec.com (Darren Westlake)
Subject: display local directory
Message-Id: <861267517.6907.0@laureate.demon.co.uk>

Hi,

How can I display a kind of file chooser dialog box that will allow
the user to choose a file? Can it be done?

Thanks,

Darren



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

Date: 17 Apr 1997 09:05:53 +0100
From: abw@peritas.com (Andy Wardley)
Subject: Re: gethostname?
Message-Id: <5j4ll1$h5d@aoxomoxoa.peritas.com>

Justin C Lloyd <lloyd@cs.fsu.edu> wrote:
>Am I competely missing something, or does perl not have a "gethostname"
>function (not "gethostbyname")?  It seems to have everything but that.

use Sys::Hostname;
$host = hostname;



A



-- 
Andy Wardley <abw@peritas.com>  **NEW** http://www.peritas.com/~abw 
A responsible and professional individual who has no need for silly 
comments, inane banter or bizarre "in-jokes" in his signature file.  


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

Date: Thu, 17 Apr 1997 12:16:30 +0100
From: Carlos Pi <carlos_pi@in.form.co.uk>
Subject: High Scores Script for Shockwave Game
Message-Id: <3356068E.12D2@in.form.co.uk>

I have been looking like mad for a high-scores (or similar) script that
I need for a very well-known Shockwave game out there, but with no luck
at all..!

Does anyone know of a good starting point for research into this?
I am as quick learner as I am desperate to get this script done, but I
need to know where to start!

Thanks!

Carlos Pi
carlos_pi@in.form.co.uk


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

Date: Thu, 17 Apr 1997 12:15:12 +0200
From: Andrew Filip <AFilip@impaq.com.pl>
Subject: Re: Number of Array Elements
Message-Id: <3355F830.E24A6AEE@impaq.com.pl>

$ARRAY_SIZE = scalar @ARRAY;

-- 
AFilip@impaq.com.pl

common sence is uncommon


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

Date: Tue, 15 Apr 1997 10:47:12 GMT
From: Russ McManus <mcmanr@nytrdc058.eq.gs.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <ncj4td87ebz.fsf@nytrdc058.eq.gs.com>

you asked about why i put c++ higher than scheme
in 'language power' on my pathetic ascii art graph.

what i was talking about is the low level nature
of c++.  c++ is syntactic sugar (ok plus virtual
function dispatch) on top of c, which is little
more than a portable assembler.  another thing
some people find powerful about c++ is the type
strong type checking.  

i can't believe i'm writing something that could 
be construed as a defense of c++,  but please 
interpret the graph with respect to the previous
posts; i was saying that languages like scheme
dominate tcl; they are equally good as glue languages
and MUCH more powerful.

-russ
-- 
Russell D. McManus             phone: 212-357-4901
Goldman, Sachs & Co.            beep: 917-556-0708
Intl. Equities Technology


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

Date: Thu, 17 Apr 1997 10:00:44 +0100
From: Jong <jong@mrc-lmb.cam.ac.uk>
Subject: Palindromic words search???
Message-Id: <3355E6BC.41C6@mrc-lmb.cam.ac.uk>

Hi,

I am trying to make a program which detects all the palindromic(perfect
or imperfect palindromes) sequences in any long string.

For example,


The sequence(long connected words):

-> OTENETO
   ::::::: 
   OTENETO <-


is a palindrome(perfect).


-> OSKTENETRMO  
   :  :::::  : 
   OMRTENETKSO <-

is a imperfect palindrome   



Can anybody give any good clues on how to do it?
Either using patttern match or any complicated
algorithms are welcome...


Thanks a lot,



Jong



-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter

http://www.smli.com/people/john.ousterhout/scripting.html


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

Date: 17 Apr 1997 11:31:34 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: PERL 4.036 for Solaris 2.5
Message-Id: <5j51mm$gc7@news-central.tiac.net>

In article <33554e1e.0@lightning.ica.net>,
feedme.org/anti-spam.html <"nozaki@feedME"> wrote:

>Hi! Where can I find a binary version of PERL 4  .036 for SUN Solaris 2  .5?
>Thanks!

http://www.sunsite.unc.edu/pub/packages/solaris/sparc/

might be one place to look,

Hope this helps

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: 17 Apr 1997 11:39:51 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: PERL BUG: ([]) x 3 does not work correctly
Message-Id: <5j5267$gl7@news-central.tiac.net>

In article <33555521.23275092@news.real-time.com>,
Brian Dellert <xpress@pobox.com> wrote:

>Thanks for the info. Any idea how I can get my array to contain an 
>arbitrary number of *different* array references. This is the code 
>I'm using now:
>
>my($i, @chain);
>for($i=0; $i<@$pieces; $i++) {
>	push @chain, [];
>}
 
  @chain = map {[]} @$pieces;

maybe.  Using the debugger:

  DB<1> $pieces = ['a' .. 'g']

  DB<2> @chain = map {[]} @$pieces

  DB<3> X chain
@chain = (
   0  ARRAY(0x80fb060)
        empty array
   1  ARRAY(0x80fb2a0)
        empty array
   2  ARRAY(0x80fb2b8)
        empty array
   3  ARRAY(0x80fb2d0)
        empty array
   4  ARRAY(0x80fb2e8)
        empty array
   5  ARRAY(0x80fb300)
        empty array
   6  ARRAY(0x80fb318)
        empty array
)

which hows each of the array refs in @chain pointing to different memory
locations.

Hope this helps,

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@psa.pencom.com                |      Pencom Systems Administration (work)


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

Date: 17 Apr 1997 11:12:59 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: perl syntax error
Message-Id: <5j50jr$3pu@pirate.shu.edu>

Hello -

Syed Babar <syed.babar@amd.com> writes:

>Can any one tell me what is wrong in this :

>$ex =`rsh $i 'if ( -e "/etc/lsf.conf") echo 1'` ;
>        if(!$ex) {
>         
>	when i run it i get error:
>"sh: syntax error at line 1: `echo' unexpected"

>the "line 1" can be ignored.

Sure.  I can even tell you what's wrong with your subject line :-)
The error message is coming from the shell, not from Perl.

if [ -e /etc/lsf.conf ]; then echo 1; fi


David Black
dblack@icarus.shu.edu


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

Date: 17 Apr 1997 08:47:59 +0100
From: abw@peritas.com (Andy Wardley)
Subject: Re: Reading One Character at a time
Message-Id: <5j4kjf$h1c@aoxomoxoa.peritas.com>

David Waring <dwaring@fhcrc.org> wrote:
>
>I'm new to Perl, so forgive me if this question is simple, but I have
>consulted the camel and the llama without finding the answer. I am writing
>a CGI where I receive as one variable, a sequence of characters (it is DNA
>sequence)  I have to check that all the characters are in the set of
>acceptable characters (16 characters).  What is the best way to do this?

Using a regular expression.  A character class determines the valid 
characters like so:

  [a-f]  or  [0-9a-f]  or [aeiou]     # see Camel II page 64

You can add a quantifier to specify how many of these characters
should make up the sequence.  (Camel II page 63)

  {10,20}    # between 10 and 20 characters
  {32}       # exactly 32 characters
  {18,}      # 18 or more characters
  *          # 0 or more
  +          # one or more

You'll also want to use assertions to ensure that you test the whole
string, not just a sub-section that matches.  Use the ^ (start of 
string) and $ (end of string) to do this.  (Camel II page 62)

So, the following example says "evaluate true if the entire string 
in $test (from start ^ to end $) contains one or more (+) characters 
from the range 'a' to 'f' [a-f]"

  $test =~ /^[a-f]+$/;

>As best I can tell I must test each character individually. If I could
>read them into an array it would be easy, but there will be no spaces
>between them and thus no delimiter.

There's more than one way to do it, but this isn't one of the good ones.

The function description of "split" on page 220 of Camel II describes
how to split a string into characters by using a null pattern, if you 
really *had* to do it this way.

  @chars = split(//, $test);

This is all fairly basic Perl stuff which is covered well in Camel.
If you haven't got the 2nd edition, I suggest you get hold of a copy.

A



-- 
Andy Wardley <abw@peritas.com>  **NEW** http://www.peritas.com/~abw 
A responsible and professional individual who has no need for silly 
comments, inane banter or bizarre "in-jokes" in his signature file.  


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

Date: 17 Apr 1997 11:08:50 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: References question !!!
Message-Id: <5j50c2$3m7@pirate.shu.edu>

Hello -

Joe McGuckin <joe@via.net> writes:

>Given the following:

>$foo = "joe";

>$$foo{"foo"} = "foo";
>$$foo{"bar"} = "bar";

>How do I say %$$foo, so I can foreach over the keys in the
>$$foo reference?

>I'd like to be abe to say

>  foreach $i (keys(%$$foo)){
>  }

keys %$foo
or
keys %{$foo}

+/- parentheses.

The way the symbolic reference works is that the scalar $foo is
interpreted as its value, 'joe'.  This means that your example
is equivalent to  keys(%$joe),  instead of keys(%joe).

David Black
dblack@icarus.shu.edu


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

Date: 17 Apr 1997 11:09:02 GMT
From: "M. Christophe Dumont" <C.Dumont@mercure.umh.ac.be>
Subject: rsjemail.cgi (cgi post for e-mail) - help needed to understand perl
Message-Id: <01bc4b1f$8e115060$05c2bec1@asterix.umh.ac.be>

Hello,

I try to use the rjsemail.cgi, but as I'm not a programmer, I know anything
in
C and Perl except make.
So if you can explain me the two following problems, it will be very
helpful for
me and the web site I have to setup.

1. When I run the script the Perl5.002 says it don't understand: use
CGI::Carp;
use CGI::Form;
use strict;   

"use" not allowed in expression at rjsemail.cgi line 60, at end of line    

syntax error at rjsemail.cgi line 60, near "use CGI::Carp"                 

String found where operator expected at rjsemail.cgi line 150, near "croak
"
Sendmail exited with error: $!\n""                                         
   

        (Do you need to predeclare croak?)                                 
   

syntax error at rjsemail.cgi line 150, next token ???                      

Execution of rjsemail.cgi aborted due to compilation errors.               




2. My users has a lot of <INPUT TYPE="TEXT" NAME="xxxxx" SIZE="40">. How
can I
sum all this imput into one as the body of the e-mail. I try:
$body ||=
$query->param("nom")+$query->param("prenom")+$query->param("adresse")+
$query->param("codepostal")+$query->param("localite")+$query->param("comment

aire


s")+$query->param("body");                                                 
   



Thanks,

Best regards,

-C. Dumont


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


*         Christophe Dumont         *                                     
*
* Service d'Informatique de gestion *  E-mail: C.Dumont@mercure.umh.ac.be 
*
*      Faculti Warocqui Sc. Eco     * http://panoramix.umh.ac.be/christof 
*
*    UNIVERSITE DE MONS - HAINAUT   *                                     
*
*        Place Warocqui, 17         *       Voice : +32 65 37 32 99       
*
*   B-7000 MONS   BELGIUM  (EUROPE) *         Fax : +32 65 37 30 79       
*
----------------------------------------------------------------------------


*>           L'imagination est le commencement de la criation.           
<*
*>      On imagine ce que l'on disire; on veut ce que l'on imagine;      
<*
*>       et on finit par crier ce que l'on veut.  = BERNARD SHAW =       
<*
----------------------------------------------------------------------------



begin 600 rjsemail.cgi.pl
M#0H-"B,@07)C:&EV:7-T<R!N;W1E.@T*#0H@("!4:&ES('-C<FEP="!R97%U
M:7)E<R!P97)L-0T*#0H-"B,A+W5S<B]B:6XO<&5R;" M5 T*(R,-"B,C("!R
M:G-E;6%I;"YC9VD@+2!3:6UP;&4L(%-A9F4L($=E;F5R:6,@0T=)(&)A8VME
M;F0@;6%I;"!S8W)I<'0N#0HC(PT*(R,@(&)Y(%)O8F5R="!397EM;W5R(#QR
M<V5Y;6]U<D!R<V5Y;6]U<BYC;VT^+@T*(R,@(" @($-O<'ER:6=H=" H8RD@
M,3DY-2P@,3DY-B!2;V)E<G0@4V5Y;6]U<B!A;F0@4W!R:6YG97(M5F5R;&%G
M+@T*(R,@(" @($%L;"!R:6=H=',@<F5S97)V960L('1H:7,@<V-R:7!T(&UA
M>2!B92!D:7-T<FEB=71E9"!I;@T*(R,@(" @(&5L96-T<F]N:6,@9F]R;6%T
M(&%N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!W:&EC:" -"B,C("!G96YE
M<F%T97,@86X@2%1-3"!P86=E*2!W:71H(&$@<W5B;6ES<VEO;B!F;W)M('!O
M:6YT:6YG('1O('1H:7,@( T*<V-R:7!T+@T*(R,@($%N(&5X86UP;&4@;V8@
M=&AI<R!I<R!S:&]W;B!B96QO=SH-"B,C#0HC(R @/$A434P^/$A%040^/%1)
M5$Q%/E-U8FUI="!&965D8F%C:SPO5$E43$4^/"](14%$/@T*(R,@(#Q"3T19
M/CQ(,3Y3=6)M:70@1F5E9&)A8VL\+T@Q/@T*(R,@(#QP/E!L96%S92!F965L
M(&9R964@=&\@96YT97(@:6X@9F5E9&)A8VL@8F5L;W<Z/"]P/@T*(R,@(#Q&
M3U)-($U%5$A/1#TB4$]35"(@04-424]./2(O8V=I+6)I;B]E;6%I;"YC9VDB
M/@T*(R,@(#Q)3E!55"!465!%/2)(241$14XB($Y!344](G1O(B!604Q513TB
M=V5B;6%S=&5R0')S97EM;W5R+F-O;2(^#0HC(R @/% ^4&QE87-E(&5N=&5R
M(&EN('EO=7(@96UA:6P@861D<F5S<SH\0E(^#0HC(R @(" @/$E.4%54(%19
M4$4](E1%6%0B($Y!344](F9R;VTB(%-)6D4](C0P(CX-"B,C(" \+U ^#0HC
M(R @/% ^4&QE87-E(&EN<'5T('1H92!S=6)J96-T(&]F('EO=7(@;65S<V%G
M93H\0E(^#0HC(R @(" @/$E.4%54(%194$4](E1%6%0B($Y!344](G-U8FIE
M8W0B(%-)6D4](C0P(CX-"B,C(" \+U ^#0HC(R @/% ^4&QE87-E(&EN<'5T
M('1H92!B;V1Y(&]F('1H92!M97-S86=E.CQ"4CX-"B,C(" \5$585$%214$@
M3D%-13TB8F]D>2(@4D]74STB-3 B($-/3%,](C<P(CX-"B,C(" \+U1%6%1!
M4D5!/@T*(R,@(#Q0/CQ)3E!55"!465!%/2)354)-250B(%9!3%5%/2)396YD
M($5M86EL(CX-"B,C(" @(" \24Y0550@5%E013TB4D53150B(%9!3%5%/2)2
M97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!P
M<FEN=" B/' ^22!A<'!R96-I871E('EO=7(@8V]M;65N=',@86YD('=I;&P@
M=')Y('1O(')E<W!O;F0@=&]<;B([#0H@('!R:6YT("(@("!Y;W5R(&5M86EL
M('-H;W)T;'DN7&X\+W ^7&XB.PT*("!P<FEN=" D<75E<GDM/F5N9%]H=&UL
J*"DL(")<;B([#0I]#0H-"B,C("!%;F0@;V8@<FIS96UA:6PN8V=I+@T*
`
end



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

Date: 16 Apr 1997 00:46:50 -0400
From: danwang@atomic.CS.Princeton.EDU (Daniel Wang)
Subject: Scripting vs. Systems
Message-Id: <r8td8rvfubp.fsf_-_@atomic.CS.Princeton.EDU>

>>>>> "George" == George J Carrette <gjc@delphi.com> writes:

    George> John Ousterhout <ouster@tcl.eng.sun.com> wrote in article
    George> <5i7euq$cmg@engnews2.Eng.Sun.COM>...
    >> Wow, there's been quite a party going on over here on
    >> comp.lang.scheme!

    George> There is always a party here. But I think the major reason your
    George> paper struck a nerve has nothing to do with "languages being
    George> left out" per se, but everything to do with the fact that lisp
    George> people do not beleive in your fundamental assumption that there
    George> is a difference between "scripting" and "system programming"
    George> languages.
{stuff deleted}

I think there is a real important difference between a "scripting" and
"systems programming" languages. "scripting" languages are designed to let
you *manipulate* a certain set of *fixed* abstractions easily. "System
languages" are desgined to let you *create* new abstractions. 

Sometime certain features that make it easy to manipulate abstractsions
(special syntax for example) makes it more difficult to add features that
let you create new abstractions (consider why C++ overloading drives some
people mad). Strong typing of floats versus int makes sense in C, but seems
completely crazy in Mathmatica, since in Mathmatica the abstraction you want
to manipulate are just numbers in the most abstract sense.

Perhaps these aren't the defintions Ousterhout been using, but I think this
is the defintion he should be using. Ousterhout is really making a
distiction that isn't totally meaningless. Perl is not like C or Lisp.
Notice that the distinction I'm suggesting is a fuzzy continuum.  C and Lisp
differ in the way they support creating and manipulating abstractions but
they are more alike in flavor to each other than to Perl and Tcl.

The initial intent of the langauge designers effects the flavor of the
language. Ousterhout misses the point when he tries to classify "systems"
and "scripting" languages based on a set of features. He should be asking
why were those features added. You understand a langauge if you understand
why it has certain features and how those features interact with others.
Simply knowing what features it has give little insight into the language.
This is the main reason Ousterhout doesn't make a convincing distinction
between "scripting" and "systems". He's classifing langauges based on
features rather than the motivations for those features. 

For example Tcl everythings is a string model is there because Tcl was
designed to be extended to include different and new base types. If you
added a static type system you have to allow users to extend the type
system. Not an impossible task but perhaps not worth the trouble given Tcl's
goal of providing a simple off the shelf way to integrate and control C
code. Tcl probably better viewed as a library that lets you build a whole
class of special purpose scripting langauges which all are designed to solve
a set of similar problems. i.e. maipulating abstractions written in C.
Since the set of abstractions in a "scripting" langauge is *usally* small
and well defined a type system probably does get in the way more than it
helps.

Perl has built in syntax for regular expressions rather than pushing this
feature into a library. Perl has lots of other features such as default
values and silly but useful syntaxic features to make writting a certain
class of programs easy. This was by intent not by accident.

Lots of langauges have special purpose features too. Mathmatica, Maple,
Matlab, and S-Plus are some examples of languages desgined with a specific
mathmatical bent. Mathmatica, S-Plus, and Perl to some extent under the hood
are really just Lisp systems, but they load on lots of special syntax and
the right set of built in primitives to make them easier to solve a certain
class of problems than any Lisp system could.

Ousterhout is making an important observation about different classes of
langauges, and he's not making this up. He's simply staring at the myriad of
langauges out there and noticing a pattern. His paper done a bad job of
explaing what and why this pattern is, but we shouldn't dismiss it out of
hand.


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

Date: Wed, 16 Apr 1997 15:44:47 GMT
From: Daniel Roitman <daniel.roitman@gs.com>
Subject: sybperl - rpc problem
Message-Id: <3354F3EF.41C67EA6@gs.com>

I just moved to a new server running perl5.003 and a newer version of
the Sybase modules, and my script (which worked fine under perl5.001) 
started giving me the following warnings:

'rpcInfo' is not a valid Sybase::DBlib attribute at prodchar.cgi line 28

The lines appear to be calls to either to dbrpcparam() and dbrpcsend().
I get 2 warnings on dbrpcparam calls, and one warning on dbrpcsend.

For example, line 28 in the above script is:

$dbh->dbrpcparam("\@productId", 0, SYBCHAR, -1, length($in{PROD}),
$in{PROD})

Does anybody have any ideas on how to eliminate these warnings?
(They are a bit problematic since this is a cgi script)

Thanks,

Dan Roitman


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

Date: 15 Apr 97 22:43:41 GMT
From: The Guy
Subject: Re: Technical Support
Message-Id: <3354049d.0@205.186.245.7>

All the technical support numbers you need
http://www.supporthelp.com




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

Date: 17 Apr 1997 10:49:06 GMT
From: zpalastair@unl.ac.uk (ALASTAIR AITKEN CLMS)
Subject: Re: Transliterate from a pattern?
Message-Id: <5j4v72$656@epsilon.qmw.ac.uk>

In article <5j2vs1$af8@news-central.tiac.net>, mike@stok.co.uk (Mike Stok) writes:
>In article <5j2st1$fga@epsilon.qmw.ac.uk>,
>ALASTAIR AITKEN CLMS <zpalastair@unl.ac.uk> wrote:
>>In article <570ni5.gug.ln@localhost>, tadmc@flash.net (Tad McClellan) writes:
>
>>>$value  =~ /^\s+//; # delete leading spaces
>>>$value  =~ /\s+$//; # delete trailing spaces
>>>
>>
>>in one pattern:
>>
>>$var =~ s/^\s+|\s+$//;
>
>The single pattern needs a g modifier to work:
>
>  DB<1> $var = ' foo '; $var =~ s/^\s+//; $var =~ s/\s+$//;       
>
>  DB<2> X var
>$var = 'foo'
>  DB<3> $var = ' foo '; $var =~ s/^\s+|\s+$//;
>
>  DB<4> X var
>$var = 'foo '
>  DB<5> $var = ' foo '; $var =~ s/^\s+|\s+$//g;
>
>  DB<6> X var
>$var = 'foo'

Also

Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> wrote @ Wed, 16 Apr 1997 13:14:40

actually you'd need to put the g modifier on if you wanted
it to strip both leading and trailing spaces from a given
string:
$var =~ s/^\s+|\s+$//g;

And: eli@NetUSA.Net (Eli The Bearded) wrote @ Wed, 16 Apr 1997 14:10 -0400 (EDT)

> >$var =~ s/^\s+|\s+$//;

> Shouldn't that have a /g on it?

No it shouldn't.  There can only be one beginning and one end to a string.  
Global substitution is only ever necessary where a pattern might match two or
more times within a string and you want both occurences to be substituted.

I have tried this and it works without the g modifier.  I think for the above
reason.

Alastair.


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

Date: 17 Apr 1997 10:51:17 GMT
From: zpalastair@unl.ac.uk (ALASTAIR AITKEN CLMS)
Subject: Re: Transliterate from a pattern?
Message-Id: <5j4vb5$656@epsilon.qmw.ac.uk>

In article <5j2u54$hpm$1@csnews.cs.colorado.edu>, Tom Christiansen <tchrist@mox.perl.com> writes:
> [courtesy cc of this posting sent to cited author via email]
>
>In comp.lang.perl.misc, zpalastair@unl.ac.uk writes:
>:in one pattern:
>:$var =~ s/^\s+|\s+$//;
>
>Whoops:
>
>    $var = "  front and back   ";
>
>Please try benchmarking these various methods.  You'll be surprised.

I benchmarked three strings on a sparc 20 server, one processor, 224 MB Ram,
Solaris 2.5, perl 5.003

$var1 = "   front and back   \n";
$var2 = "   front only\n";
$var3 = "back only   \n";

I tried both methods:

1) s/^\s+//;  s/\s+$//;
2) s/^\s+|\s+$//;

The first method dumped the <CR><LF> in every case and the second dumped it
only where there was at least one space at the end of the string <b>but none at
the beginning</b>.

I ran these through time with the same data:

method 1) real	0m0.11s
	  user	0m0.03s
	  sys   0m0.07s

method 2) real	0m0.11s
	  user	0m0.04s
	  sys	0m0.06s

pretty similar.  I tried it a few times and the results varied slightly but
were always pretty close.

I never modified the pattern with a g.

>Show respect for age.  Drink good Scotch for a change.

I do, I do, I am. :-)

Alastair.


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

Date: 17 Apr 1997 07:22:13 GMT
From: "Ian Johnston" <nospam_ian.johnston@ubs.com>
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <01bc4b00$0563a1b0$fb68a8c0@zhpc44668>


Tom Wheeley <tomw@tsys.demon.co.uk> wrote in article
<861153396snz@tsys.demon.co.uk>...
> In article <5j07ci$ltr@bcrkh13.bnr.ca>
>            kaz@vision.crest.nt.com "Kaz Kylheku" writes:
> 
> >     source code; default extraction of directory trees (with a switch
to defeat
> > ->  ***********
> > ->  ***********
> > 
> >     this, rather than the reverse); OS/2, VMS, Unix, RISC OS and
Macintosh ex-
> 
> Almost as important is the next feature along.  I distribute DOS
> versions of my software using PKZIP, and am forced to keep everything in
> a single directory due to the fact that 9 out of 10 people will not use
> the -d switch (despite copious notice) and so any carefully crafted
> directory structure would be ignored.
> 
> I find myself always typing `pkzip -d' whatever.  Now if I had the
source...
> 
> -- 
> :sb)
> 

Why don't you just grab zip and unzip from the InfoZip folks, and use them?
I've been using them for years on UNIX, NT and VMS with no problems. You
should be able to find them by searching the bigger PD archives on the net.

And unzip defaults to creating directories; the -j switch ("junk
directories")
suppresses their creation.

-- 
Ian Johnston, Contracting at UBS, Zurich
Hacked electronic address to defeat junk mail; please edit when replying


 


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

Date: 17 Apr 1997 01:54:31 -0700
From: "Graham C. Hughes" <graham.hughes@resnet.ucsb.edu>
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <87pvvuc9lw.fsf@A-abe.resnet.ucsb.edu>

-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "Tim" == Tim Behrendsen <tim@a-sis.com> writes:

Tim> He had "performance reviews" his entire career.  How do you think
Tim> he *got* the project?

I was unclear about what I mean by a performance review, then.  I
refer to the dreaded weapon of management, used to smite unloved
employees, not the tool to facilitate improvement.  The difference is
subtle; the former lacks the self-contemplation-and-improvement stage
of the latter.

Tim> Good programmers program for 1) Fun, and 2) Money, and the latter
Tim> inevitably produces better quality over the long haul (obviously
Tim> there can be momentary "blips" here and there).

I don't believe that one bit.  There are cases in music that back me
up; Beethoven's worst pieces were the commissioned waltzes and such.
Now, Beethoven also made a living on music; how did this work?

Simply, when he was permitted to write *his* music, in *his* form,
instead of a waltz by such and such a date, the quality was inevitably
better.  Really.  The same thing occurs in Baroque music.  Doing what
you fundamentally want to do is the harbinger of quality, not somebody
waving a fistful of money at you.  Great works of art cannot be
commissioned, they must be created.

Now, it's certainly possible to make money off art, usually by art
sales, concerts, etc.  But the money must not become the driving
force, or it ends.

The FSF used to bundle a document with emacs, detailing an experiment
with the reward process and children; I think they still do.  The
somewhat surprising result was that rewards decreased the overall
quality of the job.  A child who painted because she _wished_ to
created better pictures than the child who painted to get sweets.

Free software succeeds because the programmers get to do what they
enjoy doing; compiler hacks bang on gcc, Lisp addicts create emacs
packages, and graphics nuts write GIMP.  The result is a very
comprehensive suite of fundamentally good software.  Some commercial
companies have realized this as well; witness the astonishing quality
of the early Borland compilers compared to their Microsoft offerings.
This is why there was so much interest in NeXTStep and BeOS; the
spirit remained.  Where lies the adventuresome spirit in NT?

Tim> BTW, no offense, but *why* do people post PGP signatures?  Is it
Tim> just me, or is it completely ridiculous?

Possibly just you.  I'm actuely aware of how easy it is to forge
USENET posts, email and the like.  I prefer that people have a method
for verifying that the mail/post came from me.  The odds of me being
hit by some random cracker is minimal, but I still don't see why I
shouldn't put up additional guards.  Do you leave your car unlocked in
a parking lot because the odds are 300:1 of it being the target of a
thief?

On the other hand, perhaps I'm just paranoid.  But remember; just
because you're paranoid doesn't mean they *aren't* out to get you.
- -- 
Graham Hughes    http://A-abe.resnet.ucsb.edu/~graham/     MIME & PGP mail OK.
const int PGP_fingerprint = "E9 B7 5F A0 F8 88 9E 1E  7C 62 D9 88 E1 03 29 5B";
   #include <stddisclaim.h>

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBM1XlUyqNPSINiVE5AQFfVQP9GsOldH9wPBVlQ6N8j5rY62ubOwl6mByo
jrn3qfyjnnGqrggP56bD2djOA+vu+k1ZcgtrDkxsAgMeIOymmiWt47aS8YWnAp4Y
34Gs0zvFQiXfiOw5Fc5rwAfq5KLpHswrHLYW5kfGuCMOZqsNNqIns7vXoOS78RFt
t1MOfvwHzZM=
=xG4W
-----END PGP SIGNATURE-----


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

Date: 17 Apr 1997 07:12:52 GMT
From: ukmiep00@mcl.ucsb.edu (Paul Kmiec)
Subject: XS and C structures...
Message-Id: <5j4ihl$6p3@ucsbuxb.ucsb.edu>

Hi,
  I am trying to pass a C structure between C code and Perl Code.  I have 
looked at the perlxs and perlxstut and I followed the example and made 
a typemap for the C struct.  Everything compiles fine but when I run the test
I don't know if things are working the way they are supposed to; I cannot
referrence any of the values.  The following is the compressed version of 
the 
C structure :

struct member_info {
  char MemberID[11];
  int status;
};

This is my .xs file :

#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif

#include "mylib/mylib.h"

typedef struct member_info MI;

MODULE = Custom     PACKAGE = Custom

MI *
get_member(name, memberID)
    char * name
    char * memberID

int
add_member(name, info)
    char * name
    char * name
    MI * info

MODULE = Custom     PACKAGE = MIPtr

void
DESTROY(info)
    MI * info
    CODE:
    free(info);

In the typemap file I have :
TYPEMAP
MI * T_PTROBJ

And my test has the following :
$objref = Custom::get_member("temp", "00100");
print "$objref\n";

The above two lines manage to print out the following : 
MIPtr=SCALAR(0x8071d90)

My question is : Am I doing something wrong?  And how do I access the 
status and MemberID fields of the structure? 

I am using perl 5.003 if that helps.  Also the get_member() function 
mallocates
the space for the structure and then returns the pointed to that space.

Please email me at kmiec@sb.net.
Thanks,
Paul 



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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


------------------------------
End of Perl-Users Digest V8 Issue 322
*************************************

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