[6715] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 340 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 21 23:17:33 1997

Date: Mon, 21 Apr 97 20:05:25 -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           Mon, 21 Apr 1997     Volume: 8 Number: 340

Today's topics:
     Re: A Perl modules confusion... <tchrist@mox.perl.com>
     Re: Best Perl shareware program & tutorial for Dos/Wind (Tad McClellan)
     Re: How to expand a variable in a string? (Tad McClellan)
     howto post to www-form from Perl? vparekh@panix.com
     Re: howto post to www-form from Perl? (Nathan V. Patwardhan)
     Re: howto post to www-form from Perl? (Tad McClellan)
     Re: Last item in list is screwed  ? $l=<@list> ? (Joel Graber)
     Re: Last item in list is screwed  ? $l=<@list> ? <rra@stanford.edu>
     Re: Last item in list is screwed (Tad McClellan)
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Lyman S. Taylor)
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Kelly Murray)
     Newbie Alert:  Help!  Netscape only sees my Perl script <wpc@waterfordbikes.com>
     Re: Newbie Alert:  Help!  Netscape only sees my Perl sc (Tad McClellan)
     Re: Ousterhout and Tcl lost the plot with latest paper (Will Duquette)
     Re: Perl and Access or Oracle (Mike Stok)
     Re: Perl as its own metalanguage? (Terrence M. Brannon)
     Re: Perl as its own metalanguage? <tchrist@mox.perl.com>
     Re: Perl's equivalent to more <henne@u.washington.edu>
     Re: Perl's equivalent to more <rra@stanford.edu>
     Re: pod2info or info pages <tchrist@mox.perl.com>
     Re: Regular expression question (Tad McClellan)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Paul Prescod)
     Re: Scripting vs. Systems (Paul Prescod)
     Re: They both suck! (was: Borland or Microsoft compiler <jec01@richmond.infi.net>
     Re: Unix and ease of use  (WAS: Who makes more ...) <graham.hughes@resnet.ucsb.edu>
     Re: Win32::ODBC and Win32 Perl <rothd@roth.netX>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 22 Apr 1997 01:29:08 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: A Perl modules confusion...
Message-Id: <5jh494$leb$1@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    grimaldo@IAEhv.nl (Gandalf D'Grey) writes:
:2. I overlooked that I can only use ONE Export statement with
:   everthing in it...

There is no such thing as an export statement.  This is 
part of your confusion.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    X-Windows: The Cutting Edge of Obsolescence.
	--Jamie Zawinski


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

Date: Mon, 21 Apr 1997 18:45:54 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Best Perl shareware program & tutorial for Dos/Windows ?????
Message-Id: <i7ugj5.4p.ln@localhost>

Captain Blue (sr71@hotmail.com) wrote:
: Sirs,
: I mainly work in a non-Unix environment and am looking for the best
: Perl shareware program for a Dos/Windows platform along with a 
  ^^^^^^^^^^^^^^^^^^^^^^

Just any old perl program?


Oh. Maybe you mean you need the perl interpreter itself?

No shareware is needed. You will have to bite the bullet and
become acquainted with the world of freely available software!   ;-)

Cool huh? I know that Bill has many folks convinced that they gotta
pay to play, but don't succumb to his brainwashing...


: semi-decent tutorial. The FAQ gives some suggestions but I am not sure
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^

Just follow them ;-)

The Perl FAQ is the collective wisdom of a whole bunch of smart
perl people.

If you simply _must_ pay out some money to somebody (or even if
you don't and you just want the best way to learn Perl), then
I can recommend "Learning Perl" by Randal Schwartz (http://www.ora.com).


: which would /is  has the shortest learning curve and the 
: most useful in overall performance.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There is only one (per ported platform, I think) perl implementation, 
so overall performance will not vary very much  ;-)


: Any help would be most graciously received. Thanks a bundle.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Mon, 21 Apr 1997 18:36:55 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: How to expand a variable in a string?
Message-Id: <nmtgj5.nm.ln@localhost>

Petr Prikryl (prikryl@dcse.fee.vutbr.cz) wrote:

: Hi all,

: I have read a string into my variable $str. The string may be something
: like this:
:            "some text $variable and some text again"

: i.e. there is a sequence of characters with the `$' at the beginning of
: what looks like the name of variable. Let's assume I have the variable
: of the same name. How can I expand the string while replacing the
: substring "$variable" by the content of the $variable?

: I mean, when:   $variable = "HELLO";
: then the string will be "some text HELLO and some text again" after.

: I expect this to be fairly easy, I just have no idea :-|

: Thank you for the information,


$str =~ s/\$variable/$variable/;   #  ;-)


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 21 Apr 1997 20:39:06 -0400
From: vparekh@panix.com
Subject: howto post to www-form from Perl?
Message-Id: <5jh1ba$3go@panix.com>

I want to post to a form on the web from Perl. For example, 
I want to send the search string "automobile" to Yahoo's home page(or some
other form on the web) and get the results. 

I can't find a way to do it. I have looked around on the usual perl sites,
and read this newsgroup.

TIA...

Vic Parekh
vparekh@pobox.com

-- 
------------------------------------------------------------------
Vic Parekh
http://www.pobox.com/~vparekh   ||  email: vparekh@pobox.com
------------------------------------------------------------------


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

Date: 22 Apr 1997 01:35:11 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: howto post to www-form from Perl?
Message-Id: <5jh4kf$afc@fridge-nf0.shore.net>

vparekh@panix.com wrote:
: I want to post to a form on the web from Perl. For example, 

You'll want the POST script which is included with the LWP distribution.
Hope your provider has it!

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Mon, 21 Apr 1997 19:47:52 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: howto post to www-form from Perl?
Message-Id: <or1hj5.fv.ln@localhost>

vparekh@panix.com wrote:

: I want to post to a form on the web from Perl. For example, 
: I want to send the search string "automobile" to Yahoo's home page(or some
: other form on the web) and get the results. 

: I can't find a way to do it. I have looked around on the usual perl sites,
                                                           ^^^^^^^^^^^^^^^^
: and read this newsgroup.


You need info on the HTTP (protocol) and/or the CGI (interface).

Neither of those are likely to be at perl sites, because they are
not part of perl... 


Try some WWW sites.



Perl != CGI


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 21 Apr 1997 22:43:59 GMT
From: jgraber@daldd.sc.ti.com (Joel Graber)
Subject: Re: Last item in list is screwed  ? $l=<@list> ?
Message-Id: <JGRABER.97Apr21174359@sun_7407>


[mailed and posted]

In article <335BC611.B8B@imagicgames.com> Marcus Nordenstam <mnordenstam@imagicgames.com> writes:
[editted for brevity]
> Why is it that when I write:
> @list = ("a\n","b\n");
> while( $l = <@list> ) {  print $l;  } 

> evaluates to: 
> a<CR>
> b
 ...
> It seems like the last item in the list has it's newline
> removed, which is silly.  It means that you can't treat
> each list element the same, you have to check for the last
> item and special-case it.
> Or is there perhaps some way to disable this "feature"??

I dont even know what <@list> is supposed to do, 
but its probably not what you want.

It looks like you want to iterate over a list, 
so use      foreach $l (@list) { print $l; }

if you want to destroy the list as you use it,
maybe try   while( defined($l=shift(@list))) { print $l }

The usual use of <> is to read a line from a file.
Like this   while (<>) { print $_; }
or this     while ($defined($l=<>)) {print $l;}
or even    
  open (FileHandle1, $f="myfile") || die "Cant open $f due to : $!\n";
  while ($defined($l=<FileHandle1>)) {print $l;}

I cant even figure out what <@list> is even trying to do.
Read a line from a list of FileHandles?
Read a line from a list of filenames?
You have filenames with "\n" in them?


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

Date: 21 Apr 1997 16:27:08 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Last item in list is screwed  ? $l=<@list> ?
Message-Id: <qumenc4x8hf.fsf@cyclone.stanford.edu>

Joel Graber <jgraber@daldd.sc.ti.com> writes:

> I cant even figure out what <@list> is even trying to do.
> Read a line from a list of FileHandles?
> Read a line from a list of filenames?
> You have filenames with "\n" in them?

I can say what it's actually doing.  It's doing a shell glob.  Since that
depends on the behavior of csh, I'm not at all surprised that it's doing
strange munging of metacharacters like "\n".

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


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

Date: Mon, 21 Apr 1997 19:04:15 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Last item in list is screwed
Message-Id: <v9vgj5.fq.ln@localhost>

Marcus Nordenstam (mnordenstam@imagicgames.com) wrote:
: Why is it that when I write:

: @list = ("a\n","b\n");
: the expression 
: while( $l = <@list> )
: {
:   print $l;  
: } 

: evaluates to:
: a<CR>
: b

: when it ought to be:
: a<CR>
: b<CR>
: where <CR> is a carriage return, or newline.
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Those are not the same thing you know.

CR is ASCII 13 (decimal)

newline (ASCII calls it "linefeed") is ASCII 10 (decimal)


Because you are not asking perl to do what you think you are asking
it to do...

<@list> is NOT how you access the elements of an array.
The <> _operator_ is used to access files (or to do a filename glob)


try instead:

while( $l = shift(@list) )

or (better, I think, because it does not empty out @list):

foreach $l (@list)



: It seems like the last item in the list has it's newline
: removed, which is silly.  It means that you can't treat
: each list element the same, you have to check for the last
: item and special-case it.

: Or is there perhaps some way to disable this "feature"??
                                  ^^^^^^^^^^^^^^^^^^^^^

The "feature" is incorrect programming   ;-)


There is no known way to completely eliminate that, but reading the
documentation, and using -w and 'use strict' will usually avoid
approximately one bazillion of them...


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 21 Apr 1997 20:08:00 -0400
From: lyman@cc.gatech.edu (Lyman S. Taylor)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <5jgvh0$rj6@pravda.cc.gatech.edu>

In article <vogt-2104971424290001@204.248.25.27>,
Christopher J. Vogt <vogt@novia.net> wrote:
>In article <5jg060$q3f$1@news.utdallas.edu>, mharriso@utdallas.edu (Mark A
>Harrison) wrote:

>> : the Lisp Machines died for reasons totally unrelated to quality.....
 ....
>> : the answer is a single word: "marketing".
>> 
>> I don't think this is true...  Lisp machines died because their
>> functionality was supplanted by other more general purpose machines.
 ....

>....  Where marketing did in the LispM was in not getting
>applications developed for the LispM, not pricing LispMs competively with
>Suns and in selling LispMs as "Special Purpose Machines", ie. not "General
>Purpose Machines".  

   In the "priced to sell" catagory the LispM vendors probably could have sold
   anemic "subcompact" workstations to go along with their "Cadillac" 
   workstations too ( like the general purpose folks did...).

   To futher supplement that "it was the marketing.... " viewpoint, 
   BusinessWeek has an article this week about how the Alpha is both the 
   fastest general purpose microprocessor out. And the one with the smallest 
   market share. 

	http://www.businessweek.com/1997/17/b3524142.htm

   While marketing was not solely responsible in the Lisp Machine "demise", 
   it was a significant factor. There were a myriad of other contributing
   factors too that had very little to do with the differences in the 
   CPU's ( e.g. Symbolics real estate investments , etc. )
   
>> In other words:  Marketing didn't kill lisp machines... Good lisp
>> environments that ran on general-purpose computers killed
>> lisp machines.

   There was also the factor of moving "legacy" software over to the 
   LispM.  Although like attested to below, in some ways Genera was far ahead 
   of its time for its day.  However, some folks just can't let go of that
   trusty old 20 year old hammer ( legacy tools ).  Note that this also
   has little to do with the CPU's and more to do with the "operating system"
   API differences between "LispM OS" and classic workstation, "hacked up 
   Berkeley Unix tape", OS. 

>*I* have yet to use a Lisp development environment that supported me as
>well as Symbolics Genera did, and we're talking 15 year old technology
>here!  

-- 
					
Lyman S. Taylor           "I'm a Doctor, not a doorstop... "
(lyman@cc.gatech.edu)     	The EMH Doctor in "Star Trek: First Contact".
 
			        


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

Date: 22 Apr 1997 01:55:10 GMT
From: kem@math.ufl.edu (Kelly Murray)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <5jh5pu$4mn$1@sparky.franz.com>

>If this experience is BS, what is the truth?  Why _did_
>the Lisp machines die?

There are many reasons, which have been discussed ad naseum,
I could say lots (as others probably will) but in my opinion 
there were two major factors:

 1. Market Share. Sun agressively lowered prices to pursue market share
    and increase sales volume (and other workstatations vendors too)
    When SUN came out with $5K workstations, 
    Symbolics only grudgingly came out with $20K entry machines
    and were convinced their machines were "worth it".  
    They failed to understand the big picture of market share,
    and was still flush from defense industry buyers of their expensive machines.  
    
 2. Low-cost application delivery.  Simply non-existent with LispMachines.
    UNIX had dirt-cheap ASCII terminals, SUN had diskless machines,
    and low-cost diskful machines.  
    Symbolics eventually had a 386-pc delivery vehicle, which was about 
    5 years too late, and didn't really work, as I recall.  
    LispM applications tended to use the non-portable graphics heavily, which made
    them hard to port over to the Lisp-on-Unix vendors systems.


-Kelly Murray   (speaking for myself)








    





    


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

Date: Mon, 21 Apr 1997 18:58:23 -0500
From: Richard Schwinn <wpc@waterfordbikes.com>
Subject: Newbie Alert:  Help!  Netscape only sees my Perl script as an HTML file.
Message-Id: <335BFF1F.3B14@waterfordbikes.com>

I wrote a simple perl script which I can run through the perl
interpreter but can't through Netscape.  I've submitted the following to
a newsgroup for help but thought you might have an insight or two as
well:

I've entered a simple program and loaded in my directory on our UNIX
server.  I can run the program through telnet by invoking PERL directly
but I can't get Netscape to recognize the script as a PERL program. 
Netscape treats it like an HTML file and doesn't recognize the commands?

Here's how I invoke the program from Netscape:

<A HREF=http://www.waterfordbikes.com/prall.pl?Passed-argument>Try this
to run the program</A>

Here's the actual code:

#!/usr/bin/perl
# prall.pl
#

print "Content-type:  text/html\n\n";

if(@ARGV == 0)
{
print "<HEAD><TITLE>The print everything
form</TITLE><ISINDEX></HEAD><BODY>";

print "GET form:";
print "<FORM METHOD=GET ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM>";
print "POST form:";
print "FORM METHOD=POST ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM></BODY>"  ;

if($ENV{REQUEST_METHOD} eq "GET")
  {     read(stdin, $input_line, $ENV{CONTENT_LENGTH});
        print "You made a GET Request<BR>";
        print "passing:  $input_line<BR>";
        print "to <I>stdin</I><BR>";
   }

elsif($ENV{REQUEST_METHOD} eq "POST")
  {     read(stdin, $input_line, $ENV{CONTENT_LENGTH});
        print "You made a POST Request<BR>";
        print " $input_line<BR>";
        print "to <I>stdin</I><BR>";
   }

else
   {    print "I don't understand the REQUEST_METHOD: 
$REQUEST_METHOD<BR>";}

}  #end argv if test

else

{
print "<HEAD><TITLE>The print everything
form</TITLE><ISINDEX></HEAD><BODY>";

print "GET form:";
print "<FORM METHOD=GET ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM>";
print "POST form:";
print "<FORM METHOD=POST ACTION=/$action>";
print "Field 1<INPUT NAME=FIELD1>";
print "Field 2<INPUT NAME=FIELD2>";
print "<INPUT TYPE=submit VALUE=SUBMIT>";
print "</FORM></BODY>" ;
print "This is an <B>ISINDEX</B> query:<BR>";
print "and you input: @ARGV  ";
}

print "<PRE>";
print "REQUEST_METHOD:   $ENV{REQUEST_METHOD}\n";
print "Command line arguments:  @ARGV\n";
print "QUERY_STRING:  $ENV{QUERY_STRING}\n";
print "PATH_INFO:   $ENV{PATH_INFO}\n";
print "</PRE>\n";
print "<HR>";
print "back to <A HREF=$progname>Print Everything</A><BR>";

exit;

Any ideas?

Thanks 

Richard.


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

Date: Mon, 21 Apr 1997 19:38:54 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Newbie Alert:  Help!  Netscape only sees my Perl script as an HTML file.
Message-Id: <ua1hj5.ru.ln@localhost>

Richard Schwinn (wpc@waterfordbikes.com) wrote:
: I wrote a simple perl script which I can run through the perl
: interpreter but can't through Netscape.  I've submitted the following to
: a newsgroup for help but thought you might have an insight or two as
  ^
  ^

We're a newsgroup too you know...   ;-)


: well:

: I've entered a simple program and loaded in my directory on our UNIX
: server.  I can run the program through telnet by invoking PERL directly
: but I can't get Netscape to recognize the script as a PERL program. 
                  ^^^^^^^^

I assume you really meant Navigator here? That is only one (though
clearly the most well known) of the many products produced by the
Netscape company.

If so, then you should know that browsers (such as Navigator) aren't
*supposed* to know that it is a Perl program.

The _server_ is supposed to know that.


: Netscape treats it like an HTML file and doesn't recognize the commands?

: Here's how I invoke the program from Netscape:

: <A HREF=http://www.waterfordbikes.com/prall.pl?Passed-argument>Try this
: to run the program</A>

: Here's the actual code:

[ snip code ]

: Any ideas?


Your server is misconfigured, or you are not doing it whatever way
it _is_ configured for.

As server configurations are widely customized, the best way to
resolve this problem would be to consult with the sysadmin for
your server.


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 21 Apr 1997 11:24:04 -0700
From: will@peanut.jpl.nasa.gov (Will Duquette)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <wbwwpww7y3.fsf@peanut.jpl.nasa.gov>


In article <5ja4a2$o1u@roar.cs.utexas.edu> wilson@cs.utexas.edu (Paul Wilson) writes:

    This is understandable.  How to you feel about scripting languages
   that have a more C-like syntax, so that you'd write

        func(arg1, arg2)

   except when emitting a command to the operating system?

It depends on the project.  In the current case, I use my Tcl-based
language to write tools, but also to exercise APIs interactively.  I
prefer to type

        func arg1 arg2

when working interactively.  When writing tools, the 

        func(arg1, arg2)

notation is nice, but I'd rather use the same in both places.


   Disregarding the parenthesis issue and the infix vs. prefix issue
   (which can be solved with a simple parser on top of something like
   Scheme), how do you feal about the $x substitution thing?

The $x substitution thing took some getting used to, but I encountered
both shells and perl first, so it wasn't too add.  I find that the 
ability to build up complex strings quickly using substitution is
really handy for quick-and-dirty tool development.  You can do much
the same thing in Lisp or Scheme, of course, using lists instead of 
strings...but I can pass a string to native function written in C
and let it parse the string any way it likes.

So, I like $x for the most part.

   >I did a web search yesterday, and found a couple of Scheme
   >implementations which would probably work as well for my purposes as
   >Tcl, except for the psychological issues I mention.  If I were
   >starting over, though, I'd still pick Tcl.  

   Is this because you like programming in a shell style (e.g., don't
   mind having to force evaluation by controlling substitution) or
   because Scheme syntax is unfamiliar in other ways?

Mostly because all of the parentheses get to me, and because I think
I can more easily teach the rudiments of Tcl to people who want to use
my tools.


   >It's plenty good enough,
   >and it "feels" better to me.  Frankly, that's what's important.

   That's understandable, too.  What I'm trying to figure out is which issues
   are the most important in overcoming resistance to things like Scheme
   and Smalltalk.

Ahhh.  Smalltalk.  That's really another discussion, but here's why 
I don't like Smalltalk.  I don't think of Smalltalk as competing with
Tcl, by the way, but then, I'm not one of the people who develops 
large applications entirely in Tcl.

1. I like traditional expressions and control structures.
   A C programmer can get the gist of a Fortran, BASIC, Pascal,
   Ada, or Java program without too much effort.  The syntax isn't 
   identical, but the basic model is much the same.

2. (And this is the kicker) I really dislike having my application
   and the Smalltalk library classes live in the same "space".  In the
   Smalltalk system I've looked at (Smalltalk V), if I wanted to
   develop two separate applications they either needed to live in the
   same class tree, or I needed to maintain too entirely separate
   "images", which included all of the system classes.  This gives me
   chills, for some reason.

As someone on this thread has commented, OOP in Java is more like OOP
in Smalltalk than it is OOP in C++, and I think this is true...but in
Java, there's a nice clean separation between my code and anybody
else's code.  I like that.  Again, this may be a purely psychological
issue, but then, I program better when I'm happy. :-)

Will

-- 
--------------------------------------------------------------------------
Will Duquette, JPL  | William.H.Duquette@jpl.nasa.gov
But I speak only    | will@bean.jpl.nasa.gov
for myself.         | It's amazing what you can do with the right tools.


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

Date: 22 Apr 1997 02:28:07 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Perl and Access or Oracle
Message-Id: <5jh7nn$49n@news-central.tiac.net>


In article <335BC9DB.5D6A@swbell.net>,
Maribeth Miguel  <mmiguel@swbell.net> wrote:
>Does anyone know if Perl can access/update an Access or Oracle Database
>and how(or a link to a site or book)?

In response to the oracle database bit of your question, 

  http://www.hermetica.com/technologia/perl/DBI/index.html

might be of interest, I am shamefully ignorant of whether anything there
would be of any help with Access, but there's this in the DBI FAQ: 

 3.3 Can I access Microsoft Access or SQL-Server databases with DBI?

 In a nutshell, no. Neither of these databases, nor any ODBC-only databases
 are currently supported by DBI. However, with the advent of a successfull
 DBI Windows95 / NT port, drivers may be written for these databases fairly
 soon.

There might be something of use at http://www.roth.net/odbc/ which I found
off Dick Hardt's site http://www.activeware.com/

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: 21 Apr 1997 15:36:29 -0700
From: brannon@bufo.usc.edu (Terrence M. Brannon)
Subject: Re: Perl as its own metalanguage?
Message-Id: <ysizwwpwq9zx.fsf@bufo.usc.edu>

Eryq <eryq@enteract.com> writes:

> 
> > 
> >         * As a sidenote he says: Prolog blurs the distinction
> >         between program and data.
> 
> I think in this regard, Prolog is in the class of "most blurry",
> Lisp/Scheme the next class down, and Perl somewhere between them 
> and C/C++.

Actually Lisp lacks Perl's context sensitivity: Lisp aims to be
definitional, Perl contextual. An expression in Lisp is always that
expression, they aren't evaluated in a (scalar|array|hash) context.


-- 
o============o  Sending  unsolicited commercial e-mail (UCE) to this address
 Legal Notice   is indication of your consent to pay me $120/hour for 1 hour
o============o  minimum for professional proofreading & technical assessment.
terrence brannon * brannon@kappa.usc.edu * http://rana.usc.edu:8376/~brannon


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

Date: 22 Apr 1997 01:36:59 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl as its own metalanguage?
Message-Id: <5jh4nr$leb$3@csnews.cs.colorado.edu>

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

In comp.lang.perl.misc, 
    brannon@bufo.usc.edu (Terrence M. Brannon) writes:
:Actually Lisp lacks Perl's context sensitivity: Lisp aims to be
:definitional, Perl contextual. An expression in Lisp is always that
:expression, they aren't evaluated in a (scalar|array|hash) context.

There is no such thing as a "hash context", and an "array context"
is just a quaint way of saying "list context".  So there are only
two contexts, singular and plural.  C shares this.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
But you have to allow a little for the desire to evangelize when you
think you have good news.  
		--Larry Wall in <1992Aug26.184221.29627@netlabs.com>


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

Date: Mon, 21 Apr 1997 23:14:59 GMT
From: "Randal M. Henne" <henne@u.washington.edu>
Subject: Re: Perl's equivalent to more
Message-Id: <335BF4F3.4BCE@u.washington.edu>


Alejo Balingit wrote:
> 
> I am new to perl and would like to know if there is a way that I can see
> STDOUT a page at a time like the "more" command.  Thanks in advance.

I open up a pipe to more like this:

open  PAGER, "| more" or *PAGER = *STDOUT;
 

and then print to the file handle PAGER.

Randy


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

Date: 21 Apr 1997 17:09:12 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Perl's equivalent to more
Message-Id: <qumsp0jx6jb.fsf@cyclone.stanford.edu>

Randal M Henne <henne@u.washington.edu> writes:

> I open up a pipe to more like this:

> open  PAGER, "| more" or *PAGER = *STDOUT;

> and then print to the file handle PAGER.

Please honor $ENV{PAGER} if it's set, or people like me who think that
less is more will be annoyed at you.  :)

	$pager = $ENV{PAGER} || 'more';
	open (PAGER, "| $pager") or *PAGER = *STDOUT;

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


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

Date: 22 Apr 1997 01:31:31 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: pod2info or info pages
Message-Id: <5jh4dj$leb$2@csnews.cs.colorado.edu>

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

 [ your address, dorman@s3i.com, has been intentionally given
   to the spammer because you annoying made it difficult to reply ]

In comp.lang.perl.misc, 
    Clark Dorman <dorman@s3i.com> writes:
:I'm working on perl in emacs, and the easiest way to use the manual is
:to use GNU info pages in emacs.  However, I cannot find a pod2info.
:Does one exist?

There was once a version; it is not maintained.  
I suggest you learn to copy with manpages or html forms.

--tom

-- 
	Tom Christiansen	tchrist@jhereg.perl.com


Emacs is a fine programming language, but I still prefer perl. -me


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

Date: Mon, 21 Apr 1997 19:12:01 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Regular expression question
Message-Id: <hovgj5.ar.ln@localhost>

Bill Wenger (wwenger@enron.com) wrote:

: I have data in a comma delimited  file such that some of the fields
                   ^^^^^^^^^^^^^^^^^^^^^

Surely you mean comma _separated_ file.


: themselves contain commas.  What I need to do is split the fields by the
: commas but the data that has a comma embedded in it is throwing off the
: split function.  When the data does indeed have a comma in it, the data is
: put in double quotes.  Thus I have something like the following:

: 10,"Fred, Wilma and Pebbles","The Flintstones",100
: 20,"Barney, Betty and Bambam Rubble","The Flintsones",150
: 30,"Jerry Seinfeld","Seinfeld",200


Yep. That looks like comma separated to me. Comma _delimited_ would be:

,10,,"Fred, Wilma and Pebbles",,"The Flintstones",,100,

with a comma delimiting (delimiting => marks the limits, both the
start and the end) each field.


This is not just a terminology nitpik, if you knew the correct term
for your file type, then you could word search for that term in the
copious free documentation that is available for Perl.


: What I would like to be able to do is to break the fields of each record
: into 4 fields something like ($f1,$f2,$f3,$f4) = split/,/;

: This works on the last record but not on the first two.  I don't mind
: stripping the extra commas out or replacing them with some other character.

: Any help would be appreciated.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Any reading of the FAQ would be appreciated (it does have the answer
to this very question in there somewhere, search for 'comma-separated')


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Mon, 21 Apr 1997 20:35:33 GMT
From: papresco@csclub.uwaterloo.ca (Paul Prescod)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <E90979.Cvz@undergrad.math.uwaterloo.ca>

In article <s6yohb9mf4y.fsf@aalh02.alcatel.com.au>,
Chris Bitmead uid(x22068) <Chris.Bitmead@alcatel.com.au> wrote:
>
>If you're using string->number you're already doing fairly
>sophisticated programming. The naive user can input and output numbers
>without conversion.
>
>scheme
>> (* (read) 2)
>10
>=> 20

Okay, you want to put up a dialog box. You want to report the number in it.
In scheme, you must type number->string, which is very reasonable for 
programmers -- you want to understand the difference between numbers and
strings. End-users don't. Thus I think that automatically coercing strings
is quite reasonable in in a scripting language. Unfortunately TCL has some
"gotchas" that makes it not perfect as a scripting language. REXX also has
some funny gotchas. Sometimes when you bend over too far trying to help
the user, your presumptions of what they want lead to many subtle errors.

 Paul Prescod



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

Date: Mon, 21 Apr 1997 21:04:24 GMT
From: papresco@csclub.uwaterloo.ca (Paul Prescod)
Subject: Re: Scripting vs. Systems
Message-Id: <E90AJC.485@undergrad.math.uwaterloo.ca>

In article <r8t4td14mfc.fsf@nordica.CS.Princeton.EDU>,
>This is my definition of a type system. I should be shot for forgetting some
>people have very different ideas of what a type system is. 

Umm. Like everyone else who has ever studied programming languages?

> **Statically
>decidable** typing is what make "type systems" a win as it catches errors at
>compile time rather than at runtime.

It also "catches" correct code and says: "you can't do that." I'm not going to
get into an argument about which is better: I use both. But clearly runtime
typing is also "a win". Compare programming in a language with neither
static nor runtime type checking to one with either. Types are important 
whenever they are checked.

I also wonder: what language do you program in that has completely statically 
decidable type checking? I don't know of many modern languages that do not
allow you to cast up and down the class hierarchy, at least. Yes, I know 
that such languages exist, but from your comment above I do not think that
you are using something like ML. In other words, most languages allow you 
to do away with static type checking if you want to. Most Lisps will allow
you to add it if you want it.

 Paul Prescod



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

Date: Mon, 21 Apr 1997 21:46:58 -0700
From: Jim Campbell <jec01@richmond.infi.net>
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <335C42C2.6D80@richmond.infi.net>

Bob Stout wrote:
> 
> On Fri, 18 Apr 1997, Da Borg wrote:
> 
> > Use CC compilers, there are lots of them, GCC, HPUX CC,
> > Sun CC etc..
> 
> Obviously someone who never had to do commercial PC development for a
> living. If you had, then your eloquent Subject: line would read "Unix
> compilers suck!"
> 
> In either case, you'd be wrong. You've proved nothing other than your
> parochialism and childishness...
> 
> > BTW, if you are deprived of pleasure of using Unix systems
> > for developing and have to use other guys, then I'd say both
> > Micro$hit and Dorkland suck big time and Watcom rules them all!
> 
> It depends on the job. If they're doing Windows development, then
> Microsoft and Symantec are probably their best bets, followed closely by
> Borland with Watcom and Metaware trailing. For non-Windows app's, the
> ordering would be different, but how different would depend on a lot of
> different factors. IOW, there's no simple answer, only simple-minded
> respondents...
> 
> -------------------------------------------------------------
> MicroFirm: Down to the C in chips...
> FidoNet 1:106/2000.6
> Internet rbs@snippets.org
> Home of SNIPPETS - Current release:
>       ftp://snippets.org/pub/snippets/snip9611.zip & snip9611.taz (.tar.Z)
>       http://www.snippets.org/
>       juge.com:/c/snip9611.lzh
>       PDN nodes (SNIP9611.RAR) and SimTel mirror sites
You Suck!


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

Date: 21 Apr 1997 08:14:46 -0700
From: "Graham C. Hughes" <graham.hughes@resnet.ucsb.edu>
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <877mhw8l1h.fsf@A-abe.resnet.ucsb.edu>

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

>>>>> "Tom" == Tom Wheeley <tomw@tsys.demon.co.uk> writes:

Tom> Why would anyone want to forge one of your posts?  Does anyone
Tom> ever check?

*I* check.  And frankly, I'd rather not run the risk.  I stopped
thinking `oh, it'll never happen to me', when someone tried to use my
personal machine as a warez repository.

Tom> The fact is that you are breaching the not-quite-an-RFC
Tom> son-of-rfc1036 which states a maximum of 4 lines of .signature.

Not hardly.  In newsreaders that strip PGP (like Gnus), my signature
comes out to three lines.  In others, I don't have a proper signature
line, so... (admittedly, this is a technicality, but so is your
point).

Tom> Where I can accept good usage of a PGP key is f.e. the posts in
Tom> comp.os.linux.announce, and other such important announcements.

Certainly.  However, I believe that it has wider applications than
that; I choose MUAs based on their ability to handle PGP.  YMMV.

Tom> Posts in discussion do not merit that kind of non-readable crap.
Tom> Usenet is a human readable medium only, save for *.binaries.*

Which is why I use the clearsig stuff.  Really, it doesn't affect the
readability, threads like this use up far more bandwidth than me PGP
signing everything and its brother, and it keeps me happy.  If you
don't like it, don't sign yours!
- -- 
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

iQCVAwUBM1uEZSqNPSINiVE5AQEVeQQAkUCWMWTI+/yM34Pkg48sWXZdLTyg041B
ohNaUFDMHoDLWeSlqjz0vyMttM9x9FAODpPkNCGrVUhvi3zC+pQsdaMcbTSb9/4U
hWlcRUs0frJWX/JNxNdOsVEZtBQDCy9ZoLKqNfp1a/PFrDDmxVfvdf8yGkCL16FY
umtrlWE1bO4=
=5h9h
-----END PGP SIGNATURE-----


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

Date: 21 Apr 1997 23:59:00 GMT
From: "Dave Roth" <rothd@roth.netX>
Subject: Re: Win32::ODBC and Win32 Perl
Message-Id: <01bc4eaf$b90ad730$56906ec6@main2>


There is currently support for win32 perl builds: 106-110, 303 and 304.
I plan on recompiling for you folks using build 306, but I can not say when
(that depends upon my free time -- not much of that lately).
dave
-- 
================================================================
Dave Roth                               ...glittering prizes and
Roth Consulting                     endless compromises, shatter
rothd@roth.net                         the illusion of integrity

 My email address is disguised to fool automailers. Remove the
                 trailing 'X' to send me email.
****************************************************************
Use of  this message or  email address  for commercial  purposes
(including "junk" mailings) is strictly prohibited and protected
under  current  international  copyright laws  and United States
Code, Title 47, Chapter 5, Subchapter II.



Patrick C. K. Wu <ckwu6@iesun21> wrote in article
<Pine.SOL.3.95.970421183400.1721A-100000@iesun21>...
> Hi all
> 
> Could anyone tell me that what version of Win32 Perl should be used with
> Win32::ODBC (v970208).  As I use Win32 Perl 5.003 with this Win32::ODBC,
> I get "Parse Exception" using the test.pl provided in Win32::ODBC.
> 
> Thanks for any comments or pointers
> 
> Regards/Patrick C. K. Wu
> 
> email: ckwu6@ie.cuhk.edu.hk
> 
> 
> 


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

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

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