[6498] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 123 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 15 14:08:29 1997

Date: Sat, 15 Mar 97 11:00:30 -0800
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, 15 Mar 1997     Volume: 8 Number: 123

Today's topics:
     ANNOUNCE: Getopt::Long 2.9 -- Universal command line op <jvromans@squirrel.nl>
     ANNOUNCE: Xforms4Perl version 0.5 <martin@nitram.demon.co.uk>
     Calling html headers and footers <webdesign@abacom.com>
     Extracting Day of Week <monte@ispi.net>
     Re: Help! Simple Question: Error 501: "Not Supported" lvirden@cas.org
     Re: How can I use #! w/o knowing where perl lives? (Andrew M. Langmead)
     Re: initialization problem and segmentation fault (Mr J K Tan)
     Re: Is globbing still useful? <roderick@argon.org>
     Re: isqlperl4 and the Future <roderick@argon.org>
     perl 5 on NT4 install help needed (badly) <recall@easinet.co.uk>
     Re: perl 5 on NT4 install help needed (badly) <wntrmute@gte.net>
     Perl for WIN32 - Can't Run Scripts From Web Server (swasey)
     Re: Search Engine in Perl... <ghouston@scott.net>
     Re: sourcing (bash) config files within perl <tc.REMOVE@vcpc.univie.ac.at>
     Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
     Re: using chat2.pl <merlyn@stonehenge.com>
     Re: What language do Perl REs recognize? (Bernie Cosell)
     Re: What's a good Perl book? <NOSPAMjohntj@bellsouth.net>
     Re: What's a good Perl book? (Eric Palmer)
     Re: What's a good Perl book? (Eric Palmer)
     Re: Why doesn't flock() work properly on Solaris? <roderick@argon.org>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 15 Mar 1997 15:36:02 +0100
From: Johan Vromans <jvromans@squirrel.nl>
Subject: ANNOUNCE: Getopt::Long 2.9 -- Universal command line options processing
Message-Id: <m2rahhi5nx.fsf@phoenix.squirrel.nl>

Version 2.9 of module Getopt::Long is now available via CPAN. It
should soon appear in directory authors/Johan_Vromans as file
GetoptLong-2.9.tar.gz. It will be standard part of Perl 5.004.

Module Getopt::Long implements an extended getopt function called
GetOptions(). This function implements the POSIX standard for command
line options, with GNU extensions, while still capable of handling
the traditional one-letter options (including option bundling).

The kit contains:

  README         -- Introductionary text
  GetoptLong.pm  -- version 2.9 of Getopt::Long (subroutine GetOptions)
  newgetopt.pl   -- version 1.17 of newgetopt.pl (subroutine NGetOpt)
  Makefile.PL    -- Makefile for installation
  skel.pl        -- Skeleton program to use Getopt::Long
  skel2.pl       -- Skeleton program to use Getopt::Long with Pod::Usage

The README document is attached to this message.

The best way to download from CPAN is to use a Web browser and point
it to http://www.perl.com/CPAN/ (include the final slash!). It will
automagically be redirected to a CPAN site in your neighborhood. URL:
http://www.perl.com/CPAN/authors/Johan_Vromans

User visible changes w.r.t version 2.6
--------------------------------------

* A new way to configure Getopt::Long. Instead of setting module local
  variables, routine Getopt::Long::config can be called with the names
  of options to be set or reset, e.g.

    Getopt::Long::config ("no_auto_abbrev", "ignore_case");

  Configuring by using the module local variables is deprecated, but
  it will continue to work for backwark compatibility.

---- README ----

Module Getopt::Long - extended processing of command line options
=================================================================

Module Getopt::Long implements an extended getopt function called
GetOptions(). This function implements the POSIX standard for command
line options, with GNU extensions, while still capable of handling
the traditional one-letter options.
In general, this means that command line options can have long names
instead of single letters, and are introduced with a double dash `--'.

Optionally, Getopt::Long can support the traditional bundling of
single-letter command line options.

Getopt::Long::GetOptions() is part of the Perl 5 distribution. It is
the successor of newgetopt.pl that came with Perl 4. It is fully
upward compatible. In fact, the Perl 5 version of newgetopt.pl is just
a wrapper around the module.

For complete documentation, see the Getopt::Long POD document or use
the command

    perldoc Getopt::Long

FEATURES
========

* Long option names

Major advantage of using long option names is that it is much easier
to memorize the option names. Using single-letter names one quickly
runs into the problem that there is no logical relationship between
the semantics of the selected option and its option letter.
Disadvantage is that it requires more typing. Getopt::Long provides
for option name abbreviation, so option names may be abbreviated to
uniqueness. Also, modern shells like Cornell's tcsh support option
name completion. As a rule of thumb, you can use abbreviations freely
while running commands interactively but always use the full names in
scripts. 

Examples (POSIX):

    --long --width=80 --height=24

Extensions:

    -long (convenience) +width=80 (deprecated) -height 24 (traditional)

By default, long option names are case insensitive.

* Single-letter options and bundling

When single-letter options are requested, Getopt::Long allows the
option names to be bundled, e.g. "-abc" is equivalent to "-a -b -c".
In this case, long option names must be introduced with the POSIX "--"
introducer.

Examples:

    -lgAd (bundle) -xw 80 (bundle, w takes a value) -xw80 (same)

By default, single-letter option names are case sensitive.

* Flexibility:

  - options can have alternative names, using an alternative name
    will behave as if the primary name was used;
  - options can be negatable, e.g. "debug" will switch it on, while
    "nodebug" will switch it off.    
  - options can set values, but also add values producing an array
    of values instead of a single scalar value, or set values in a hash.

* Options linkage

Using Getopt::Long gives the programmer ultimate control over the
command line options and how they must be handled:

  - by setting a global variable in the calling program;
  - by setting a specified variable;
  - by entering the option name and the value in an associative array
    (hash);
  - by calling a user-specified subroutine with the option name and
    the value as arguments;
  - combinations of the above.

* Customization:

The module contains a special method, Getopt::Long::config, to control
configuration variables to activate (or de-activate) specific
behavior. It can be called with one or more names of options:

  - default

	Restore default settings.

  - auto_abbrev      

	Allow option names to be abbreviated to uniqueness. 

  - getopt_compat   

	Allow '+' to start options.

  - permute
  - require_order           

	Whether non-options are allowed to be mixed with options.

	permute means that 

	    -foo arg1 -bar arg2 arg3

	is equivalent to

	    -foo -bar arg1 arg2 arg3

	(provided -foo does not take an argument value).

	require_order means that options processing
	terminates when the first non-option is encountered.

	    -foo arg1 -bar arg2 arg3

	is equivalent to

	    -foo -- arg1 -bar arg2 arg3

  - bundling

	Setting this variable to a non-zero value will allow 
	single-character options to be bundled. To distinguish bundles
	from long option names, long options must be introduced with 
	"--" and single-character options (and bundles) with "-".

  - ignore_case      

	Ignore case when matching options.

  - pass_through

	Do not issue error messages for unknown options, but leave
	them (pass-through) in @ARGV.

* Usable variables

  - $Getopt::Long::error

	Internal error flag. May be incremented from a call-back
	routine to cause options parsing to fail.

  - $Getopt::Long::debug           

	Enable copious debugging output. Default is 0.

AVAILABILITY
============

The official version for module Getopt::Long comes with the Perl 5
distribution. 
Newer versions will be made available on the Comprehensive Perl Archive
Network (CPAN), see "http://www.perl.com/CPAN/authors/Johan_Vromans".

COPYRIGHT AND DISCLAIMER
========================

Module Getopt::Long is Copyright 1990,1997 by Johan Vromans.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

-------------------------------------------------------------------
Johan Vromans                                  jvromans@squirrel.nl
Squirrel Consultancy                       Boskoop, the Netherlands
http://www.squirrel.nl       http://www.squirrel.nl/people/jvromans
------------------ "Arms are made for hugging" --------------------


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

Date: 15 Mar 1997 14:30:13 GMT
From: Martin Bartlett <martin@nitram.demon.co.uk>
Subject: ANNOUNCE: Xforms4Perl version 0.5
Message-Id: <5gebpl$4g3$1@nadine.teleport.com>

After nearly a year of trying to get this thing done, I have just
uploaded the files

	Xforms4Perl.5.tgz
  and	Xforms4Perl.5.text

to $CPAN/authors/id/MARTINB

This is a package that provides Perl 5.002 and above a binding to the
xforms GUI development tool kit available from

	ftp://einstein.phys.uwm.edu/pub/xforms

and supports the 0.81 public release and 0.84 and 0.85 testing releases

The files actually contain three perl modules:

	Xforms:		provides the binding to the xforms library
	XEvent		provides perl OO acess to XEvent structures
	XFontStruct	provides perl OO access to XFontStruct

The api implemented in the Xforms package is designed to be as close as
possible to the C api described in the xforms documentation, while
making necessary transforms to perl conventions (such as returning lists
rather than updating input arguments).

The packages are ALPHA, but the 0.4 version has been widely picked up by
the xforms community (0.4 was not provided on CPAN).

0.5 implements many suggestions made by CPAN people a year ago when 0.3
was being released. A conversion script is provided with package to move
perl Xforms scripts from 0.3/0.4 to 0.5

Maintained by me (e-mail below) and comments are very welcome (hopefully
this time it will take a lot less than a year to implement the
changes!!)

Copyright is in my name under usual GNU terms - its free, it remains
mine, I hold no rights over anything you develop using it etc - details
in the download files.

Enjoy

===========================================================
    _/      _/_/_/_/
   _/_/  _/_/     _/
  _/ _/_/ _/_/_/_/      Martin John Bartlett
 _/  _/  _/     _/      (martin@nitram.demon.co.uk)
_/      _/_/_/_/
       _/
_/    _/
 _/_/
===========================================================




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

Date: Sat, 15 Mar 1997 11:55:47 -0500
From: Bergy <webdesign@abacom.com>
Subject: Calling html headers and footers
Message-Id: <332AD492.6075@abacom.com>

I want to print an html response to a perl5 script and I would like to
use .html files instead of placing 100% of the code in my source (icons
bar and header...).

I dont remeber the piece of code that could do this...

Thanx for your help!


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

Date: Sat, 15 Mar 1997 10:49:22 -0600
From: Monte Ohrt <monte@ispi.net>
Subject: Extracting Day of Week
Message-Id: <332AD312.7009@ispi.net>

If I know the MM/DD/YYYY, what is the easiest way to get the weekday?
I know I can translate this into timelocal(), and then get the
weekday back with localtime(), but is there an easier, more
efficient way?

Thanks
Monte


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

Date: 15 Mar 1997 17:46:41 GMT
From: lvirden@cas.org
Subject: Re: Help! Simple Question: Error 501: "Not Supported"
Message-Id: <5gena1$o65@srv13s4.cas.org>


Any time someone sees a question that seems either useful to be documented
or frequently asked, it would be useful to send _an email_ to the folk
responsible for the FAQ in question providing useful answers.

But be sure you have _read_ the latest version of the FAQ first so that
you don't recreate the wheel.
-- 
Larry W. Virden                 INET: lvirden@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.


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

Date: Sat, 15 Mar 1997 16:47:39 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: How can I use #! w/o knowing where perl lives?
Message-Id: <E73FzF.A0z@world.std.com>

Greg W Sternberg <gwstern@netmail.mnet.uswest.com> writes:


>> Andrew M. Langmead wrote:
>> > How about all the variations on
>> >
>> >            #!/bin/sh -- # -*- perl -*- -p
>> >            eval 'exec perl $0 -S ${1+"$@"}'
>> >                if 0;
>> >
>> > That are found in the man pages and the camel book?

>   However, for those of us that #!/bin/env perl doesn't work on
>using ksh (or csh if you're careful) instead of sh works for me.

>   I do have a couple of questions about the syntax tho:

Lets go over what happens. 

1. The shell is run with this script as an argument. It starts parsing
it line by line.

2. The first line, #!/bin/sh... in bourne shell syntax, is a comment
and ignored.

3. The second line "eval 'exec ..." in bourne shell syntax, takes the
first argument ('exec ...') and passes into the interpreter to execute. 

4. The line 'exec perl ...', in bourne shell syntax, tells the
interpreter to replace itself with program and arguments given. At
this point, the shell is no longer running the script, so any lines
after this one no longer need to be in shell compatible syntax.

5. Perl starts running the script. It takes the whole script and
compiles it into parse trees. Everthing between a "#" token and the
end of line is ignored. The "eval" command is compiled with 'exec perl
 ...' as its argument. (the exec command won't get compiled until run
time, because that is what eval does.)


6. It executes the first executable statement, "eval 'exec ..." if 0;
(In perl syntax both lines are one statement.) since the statement has
a statment modifier, that expression is evaluated first. Since it is
false, the rest of the statement is not executed. If you are not
familier with statement modifiers, take a look at the perlsyn man
page. Or the camel book. 

7. Perl then executes the rest of the script.

So to answer your questions.


>   1) What purpose does the eval statement serve ?  You do need it
>      but I'm not sure what it does ?

Its most important feature is that it is legal syntax in both the
shell and in perl.

>   2) I've never seen 'if 0;' syntax before - it seems to cause ksh
>      to ignore the rest of the script (?).

In perl it is a statement modifier that causes the previous expression
to not be executed. In shell syntax, it would be a syntax
error. Luckily, the shell stopped attempting to execute the script
during the exec.

>   3) I'm also unsure what "$@" does - $@ seems to work to

Check what the difference is when you have an argument with embedded
spaces.

-- 
Andrew Langmead


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

Date: 15 Mar 1997 17:53:03 -0000
From: csutr@csv.warwick.ac.uk (Mr J K Tan)
Subject: Re: initialization problem and segmentation fault
Message-Id: <5genlv$j4h@crocus.csv.warwick.ac.uk>

I receive many helpful replies. It is great to have 
so many  friendly perl folks all around :)

Thanks again 

Jit
-- 
Jit Kiat Tan 
Warwick University
Computer System Engineering 3rd year


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

Date: 15 Mar 1997 10:46:12 -0500
From: Roderick Schertler <roderick@argon.org>
To: mikenak@best.com
Subject: Re: Is globbing still useful?
Message-Id: <pz67yt410m.fsf@eeyore.ibcinc.com>

On Fri, 14 Mar 1997 16:04:47 -0800, Mike Nakagawa <mikenak@best.com> said:
> 
> $string = "file1";
> &$string;          # this runs file1, since when can you run a scalar?
> 
> In perl 4, trying to do this involved putting "file1" into a glob, 
> then using the glob in another context.

Not true, that code works exactly the same in Perl 4 and Perl 5.

> I guess the question I have is of what use is globbing in Perl 5?

They are still useful, but in fewer of the ways they used to be.  Search
for typeglob in perldata(1), perlmod(1), perlref(1) and perlsub(1).

-- 
Roderick Schertler
roderick@argon.org


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

Date: 15 Mar 1997 10:41:19 -0500
From: Roderick Schertler <roderick@argon.org>
To: bwilson@gate.net (Brian Wilson)
Subject: Re: isqlperl4 and the Future
Message-Id: <pz913p418t.fsf@eeyore.ibcinc.com>

On 14 Mar 1997 16:35:52 -0500, bwilson@gate.net (Brian Wilson) said:
> 
> [...] They're worried that we'll hit some Informix revision upgrade,
> and there won't be an isqlperl that works with it, so we won't be able
> to upgrade.

You've got the source to both Perl 4 and isqlperl so you can fix it
yourself if that happens.  Or, if you don't have the expertise in-house,
you can hire someone else to do it.

> I need to get some idea of the direction that isqlperl is going, as
> well where DBI (and most specifcally DBD:Informix) is headed in case
> we need to cut over that way and do some rewrite.

isqlperl isn't going anywhere as far as I know, it is dead.  There's no
reason for it to go anywhere.  It is still useful, though, because
DBD::Informix doesn't work all the places isqlperl does yet.
Rather than fixing isqlperl to work with newer perls it makes much
more sense to put the work into fixing DBD::Informix to work with
more systems.

If you can use DBD::Informix install it immediately and use it for all
new work.  At my shop we're still using isqlperl simply because we can't
use DBD::Informix.  (It doesn't work with the old version of SE (4.10)
we use.  As soon as we upgrade I'll install it.)

-- 
Roderick Schertler
roderick@argon.org


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

Date: 15 Mar 97 14:01:10 GMT
From: "recall" <recall@easinet.co.uk>
Subject: perl 5 on NT4 install help needed (badly)
Message-Id: <01bc3149$dd609800$1f0686c3@easinet.easinet.co.uk>

Does anyone out the know how to install perl 5 on NT4 - I've tried twice
now and everything seems OK until you try and run a script - running it
locally is fine but via HTTP I get HTTP1.0/501 Not Supported error - can
somebody please tell me or point me to someone who can tell me how to
install this damned thing

Thanks in advance

Nick Clarkson
nick@easinet.co.uk


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

Date: Sat, 15 Mar 1997 01:19:46 -0500
From: Wintermute <wntrmute@gte.net>
To: recall <recall@easinet.co.uk>
Subject: Re: perl 5 on NT4 install help needed (badly)
Message-Id: <332A3F82.57C2@gte.net>

recall wrote:
> 
> Does anyone out the know how to install perl 5 on NT4 - I've tried twice
> now and everything seems OK until you try and run a script - running it
> locally is fine but via HTTP I get HTTP1.0/501 Not Supported error - can
> somebody please tell me or point me to someone who can tell me how to
> install this damned thing
> 
> Thanks in advance
> 
> Nick Clarkson
> nick@easinet.co.uk

Make sure you have registered files with a .pl extension as runnable by
perl.exe, and also make sure that your Web Server has been set up to
recognize CGI scripts and knows what to do with them.  Perl sounds like
it's installed fine, however the Web Server could use some help.

-- Wintermute


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

Date: 15 Mar 1997 15:54:22 GMT
From: swasey@wpdiss1.wpafb.af.mil (swasey)
Subject: Perl for WIN32 - Can't Run Scripts From Web Server
Message-Id: <5gegne$ssn@wpdis03.wpafb.af.mil>

Could some kindly help me with this dilemma?

I've installed the binary-only release of Perl for Win32 on both an NT 3.5 
server and a Windows 95 workstation.  The NT server is running IIS and the 
Windows 95 workstation is running Personal Web Server.

The Perl install apparently goes well on both machines.  I extracted the 
program into its final intended directory, ran the install.bat, and the 
appropriate entries for BIN, LIB and DOCS were entered into the registry.  The 
path was modified (and the machine rebooted), and I made the PL association on 
both machines.  I also copied all my PL files in the PERL/BIN directory.

Whenever I try to call any of my PERL scripts from either http server, my 
browser tries to save the script file to disk rather than run it, even though I 
went into Netscape's Helpers and told it to open PL extensions with PERL.EXE.

I've experienced this same problem on the NT server and my PC at work, at well 
as my PC at home.  What step(s) did I miss.  By the way, I also tried 
O'Reilly's WebSite on both my PCs and had the same results.

On both servers, I also created the alias Perl and pointed it to the location 
of my PERL program, but this still doesn't help.

Thank you for your time and any information you can offer.

Steve D. Swasey




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

Date: 13 Mar 1997 19:59:54 GMT
From: "Customer" <ghouston@scott.net>
Subject: Re: Search Engine in Perl...
Message-Id: <01bc2fe9$1f184160$3503f1cd@test.scott.net>



Paul Cunnell <pcunnell@csfp.co.uk> wrote in article
<33255E3B.B38@csfp.co.uk>...
> Bruno Dickhoff wrote:
> > I need a Perl-driven Full-Text-Retrieval system (CGI-Script),
> > 
> [...]
> > 
> > I have found a sample of perl-code, which does exactly this task, but

What script is this?

please reply via e-mail to ghouston@scott.net



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

Date: 15 Mar 1997 16:10:27 +0100
From: Tony <tc.REMOVE@vcpc.univie.ac.at>
To: lauriem@cstr.ed.ac.uk
Subject: Re: sourcing (bash) config files within perl
Message-Id: <7xybbpdwd8.fsf@vcpc.univie.ac.at>

Re: sourcing (bash) config files within perl, Laurence
<lauriem@cstr.ed.ac.uk> said:

Laurence> Hi, Does anybody have an answer to this problem
Laurence> that doesn't involve actually reading in the
Laurence> necessary config files and assigning each variable
Laurence> manually by pattern matching, or including the
Laurence> variables in the .bashrc file?...

Variable assignments are basically .*=.* so pattern matching
them wouldn't be at all difficult.  You just need to look
for all vars marked as "export" and then assign them with
their values to the %ENV variable in perl.

Of course, if you're doing more complicated things in the
bash files then you should write bash in perl :-)

hth,

-- 
Tony Curtis, Systems Manager             | Tel +43 1 310 93 96
European Centre for Parallel Computing,  | Fax +43 1 310 93 96 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/%7Etc/


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

Date: 15 Mar 1997 18:39:16 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <5geqck$t5q@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 08 Mar 1997 17:22:21 GMT and ending at
16 Mar 1997 03:10:39 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^(>|:|\S+>)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" e-mail address and name.

Totals
======

Total number of posters:  483
Total number of articles: 977
Total number of threads:  363
Total volume generated:   1983.1 kb
    - headers:    677.3 kb
    - bodies:     1224.2 kb (965.8 kb original)
    - signatures: 79.2 kb

Averages
========

Number of posts per poster: 2.0
Number of posts per thread: 2.7
Message size: 2078.5 bytes
    - header:     709.9 bytes
    - body:       1283.1 bytes (1012.3 bytes original)
    - signatures: 83.0 bytes

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   79   179.9 ( 59.9/107.5/ 88.1)  Tom Christiansen <tchrist@mox.perl.com>
   46   100.1 ( 26.5/ 73.6/ 47.7)  Tad McClellan <tadmc@flash.net>
   27    54.3 ( 21.4/ 32.8/ 25.1)  Tom Phoenix <rootbeer@teleport.com>
   22    31.8 ( 12.7/ 19.1/ 14.0)  Nathan V. Patwardhan <nvp@shore.net>
   13    18.8 (  7.0/ 11.8/  7.0)  Honza Pazdziora <adelton@fi.muni.cz>
   12    18.5 (  7.8/  9.0/  4.8)  brian d foy <comdog@computerdog.com>
   11    16.8 (  6.1/  9.2/  8.8)  Brian L. Matthews <blm@halcyon.com>
   11    20.5 (  9.6/ 10.9/ 10.9)  abigail@ny.fnx.com
   10   196.5 (  8.5/186.3/182.8)  perlfaq-suggestions@mox.perl.com
   10    13.1 (  8.6/  3.8/  3.5)  Bill Kuhn <wkuhn@uconect.net>

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 196.5 (  8.5/186.3/182.8)     10  perlfaq-suggestions@mox.perl.com
 179.9 ( 59.9/107.5/ 88.1)     79  Tom Christiansen <tchrist@mox.perl.com>
 100.1 ( 26.5/ 73.6/ 47.7)     46  Tad McClellan <tadmc@flash.net>
  54.3 ( 21.4/ 32.8/ 25.1)     27  Tom Phoenix <rootbeer@teleport.com>
  31.8 ( 12.7/ 19.1/ 14.0)     22  Nathan V. Patwardhan <nvp@shore.net>
  25.3 (  3.6/ 19.8/  8.3)      7  Laurel Shimer <autopen@quake.net>
  23.4 (  1.1/ 22.3/ 22.2)      2  mstich@erols.com
  20.8 (  4.1/ 14.9/  6.6)      6  sb@en.muc.de
  20.5 (  9.6/ 10.9/ 10.9)     11  abigail@ny.fnx.com
  18.8 (  7.0/ 11.8/  7.0)     13  Honza Pazdziora <adelton@fi.muni.cz>

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   55  Who makes more $$ - Windows vs. Unix programmers?
   24  Elegant way to strip spaces off the ^ and $ of a variable containing a sentence.
   11  10 commandments (was re: Which one is the best (pattern matching))
   11  flock() problem
   11  We've baffled tech support, now on to Usenet...
    9  year 2000 question
    9  I'm scared and don't know what to do. Do you know??
    9  Help! Simple Question: Error 501: "Not Supported"
    9  random perl core dumps with obscure message
    8  matching whitespace?

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

 158.4 ( 86.7/ 68.1/ 40.5)     55  Who makes more $$ - Windows vs. Unix programmers?
  37.4 ( 17.7/ 17.6/ 13.5)     24  Elegant way to strip spaces off the ^ and $ of a variable containing a sentence.
  32.2 (  3.9/ 28.1/ 25.7)      5  Perl FAQ part 8 of 0..9: System Interaction [Periodic Posting]
  31.2 (  0.8/ 30.2/ 29.8)      1  Perl FAQ part 4 of 0..9: Data Manipulation [Periodic Posting]
  31.1 (  2.1/ 28.8/ 27.6)      3  Const.pm?  Where is module?
  26.2 (  0.8/ 25.2/ 25.0)      1  Perl FAQ part 5 of 0..9: Files and Formats [Periodic Posting]
  24.4 (  5.6/ 18.7/ 12.1)      9  Help! Simple Question: Error 501: "Not Supported"
  23.3 (  0.8/ 22.3/ 21.4)      1  Perl FAQ part 7 of 0..9: Perl Language Issues [Periodic Posting]
  23.1 (  7.2/ 15.1/ 10.2)     11  We've baffled tech support, now on to Usenet...
  21.2 (  0.9/ 20.2/ 19.6)      1  Perl FAQ part 3 of 0..9: Programming Tools [Periodic Posting]

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      63  comp.lang.c++
      61  comp.unix.advocacy
      61  comp.os.ms-windows.advocacy
      61  comp.lang.c
      61  comp.os.linux.advocacy
      59  comp.infosystems.www.advocacy
      59  comp.lang.basic.visual
      59  comp.lang.tcl
      58  comp.object
      58  comp.lang.javascript

Top 10 Crossposters
===================

Articles  Address
--------  -------

      63  Jettero Heller <heller@nacs.net>
      61  Morbius <morbius@killspam.net>
      60  carla@ici.net
      54  Da Borg <vlad_imip@uniserve.com>
      42  Tim Smith <tzs@halcyon.com>
      42  wyrd@ti.com
      40  Dave Coker <dcoker@panix.com>
      34  Tony Toews <ttoews@agt.net>
      26  "Giampaolo Tomassoni" <tomassoni" @ ftbcc".it>
      21  jschwartz0010@ameritech.net


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

Date: 15 Mar 1997 09:55:26 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: "Kuntal M. Daftary" <daftary@ecn.purdue.edu>
Subject: Re: using chat2.pl
Message-Id: <8civ2taydd.fsf@gadget.cscaper.com>

>>>>> "Kuntal" == Kuntal M Daftary <daftary@ecn.purdue.edu> writes:

Kuntal> someone told me that chat2.pl is to perl as expect is to tcl/tk

sorta.  chat2 is like expect.  same general layout.

Kuntal> i wasnt able to find anything in the man pages

right.  the only docs are in the comments.

Kuntal> my expect script is something like this:

	require "chat2.pl";

Kuntal> spawn some_program

	$handle = chat::open_proc("some_program");

Kuntal> expect some_string

	chat::expect($handle, 30, "some_string", 1);

Kuntal> exp_send some_command

	chat::print($handle, "some_command\r");

Kuntal> simple and straight forward.

exactly. :-)

Kuntal> how wud a translation in perl using chat2.pl loook like?

See above.

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 534 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Sat, 15 Mar 1997 03:40:07 GMT
From: bernie@fantasyfarm.com (Bernie Cosell)
Subject: Re: What language do Perl REs recognize?
Message-Id: <332b1651.84607429@news.swva.net>

Douglas Seay <seay@absyss.fr> wrote:

} Ronald Fischer wrote:
} > 
} > >>>>> On Thu, 13 Mar 1997 00:15:41 GMT
} > >>>>> "Bernie" == Bernie Cosell <bernie@fantasyfarm.com> wrote:
} > Bernie> I was wondering if anyone has characterized the languages accepted by Perl
} > Bernie> Regular Expressions. The class is larger than the Regular Languages but
} > Bernie> isn't the context-free languages... what is it?
} > Could you give an example of a Perl RE that describes a language that
} > can not be recognized by a type 3 grammar?
 
} ...  Perl allows limited
} used of
} 
} 	A -> bcb
} 
} with a back reference, such as
} 
} 	/([abc])[yxz]+\1/
} 
} which will match [abc] followed by [xyz]+, followed
} by which ever letter was matched in [abc]
} 
} 	axa	matches
} 	axb	doesn't, because the back reference \1
} 		refers to the "a", not "[abc]"
} 
} note that this is not all the way to a CFG acceptance

  ... Actually, it is harder than that, as far as I can see.  Not only is
it not "all the way", but I don't think you can *find* a CFG for Perl RE's 

For example, consider:
        /([abc]*)\1/

You get a language that I can't see how to describe with a CFG.  The
language consists of two copies of strings from [abc]*.

If you go back to automata theory, what this says is that you *cannot*
recognize Perl REs with a pushdown automaton.  When I took classes in all
this stuff [a LOT of years ago], there wasn't any plateau above context
free, and so that would imply that you need a full turing machine to
recognize Perl REs.  BUT: as has been noted, you can't even express simple
'balanced parens' or "nested if/then/else" in Perl REs.

Where does that leave you?  If it really is an incomparable class of
languages, that's some language/automaton theory that has appeared since I
went to school --- that languages form a lattice rather than nested
subsets!

Fascinating, and it also brings up the question of exactly what *is* the
power of the automaton that recognizes Perl's REs.  If it recognizes some
langauges that are beyond context-free, does that mean that the _automaton_
is powerful enough to do CF languages, and so all we need to do is figure
out some simple extension ['simple' in the same way that the backreference
machinery is conceptually simple to describe] that'd make Perl RE's include
the context free languages?  AND then there's the next step: If perl REs
are already beyond CF and so on-the-way to CS, is there some additional
"simple" extension to REs that'd make them full-blown context sensitive??

So much for "ls *.[ch]"...:-)

  /Bernie\
-- 
Bernie Cosell                     Fantasy Farm Fibers
bernie@fantasyfarm.com            Pearisburg, VA
    -->  Too many people, too few sheep  <--          


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

Date: Fri, 14 Mar 1997 23:46:44 -0500
From: John Johnson <NOSPAMjohntj@bellsouth.net>
Subject: Re: What's a good Perl book?
Message-Id: <332A29B4.7C58@bellsouth.net>

Laurence Molloy wrote:
> 
> Bradley Alan wrote:
> It's worth noting that there are actually 2 camel books..."Programming
> Perl" is very useful as a reference, but David Tong did say he was new
> to perl so the "Learning Perl" book is likely to be better as an initial
> introduction to the concepts and syntax, with the "Programming" volume
> becoming useful later on.


 That would be the llama book.

 (Although the llama is related to the camel, different animal though.)

> 
> The "Learning" volume doesn't actually cover everything (and I guess
> that's rightly so...otherwise it would just confuse the average newbie)
> so when the programming becomes more involved, you may sometimes only
> find the neat little tricks and commands you're looking for in the
> "Programming" volume. At least that's what I've found.
> 
> Laurence.
> --
>  ____________________________________________________________
> 
>   Laurence Molloy
>   Centre for Speech Technology Research
>   University of Edinburgh
>   Level D
>   80 South Bridge               Tel.  +44 131 650 6357
>   Edinburgh.  EH1 1HN           Fax.  +44 131 650 6351
>   Scotland, UK.                 Email lauriem@cstr.ed.ac.uk
>  ____________________________________________________________


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

Date: Sat, 15 Mar 1997 17:44:54 GMT
From: efp@etechinc.com (Eric Palmer)
Subject: Re: What's a good Perl book?
Message-Id: <332bc76c.61202374@news.comstar.net>

On Fri, 14 Mar 1997 15:56:06 +0000, Laurence Molloy
<lauriem@cstr.ed.ac.uk> wrote:


>
>
>It's worth noting that there are actually 2 camel books..."Programming
>Perl" is very useful as a reference, but David Tong did say he was new
>to perl so the "Learning Perl" book is likely to be better as an initial

In advance - I apologize for being picky.  The following point
was made to me by many JAPH' when I 1st started learning
perl.

   There are two editions of the camel book 
  the latest being for Perl 5 

   but the learning perl book is the Llama book - sometimes 
   referred to as the no-hump camel.



--
Eric P.
efp@etechinc.com
http://www.etechinc.com/
<*** standard disclaimer ***>


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

Date: Sat, 15 Mar 1997 13:02:39 GMT
From: efp@etechinc.com (Eric Palmer)
Subject: Re: What's a good Perl book?
Message-Id: <332a9cb6.50268802@news.comstar.net>

On Fri, 14 Mar 1997 15:56:06 +0000, Laurence Molloy
<lauriem@cstr.ed.ac.uk> wrote:


>
>
>It's worth noting that there are actually 2 camel books..."Programming
>Perl" is very useful as a reference, but David Tong did say he was new
>to perl so the "Learning Perl" book is likely to be better as an initial

In advance - I apologize for being picky.  The following point
was made to me by many JAPH' when I 1st started learning
perl.

   There are two editions of the camel book 
  the latest being for Perl 5 

   but the learning perl book is the Llama book - sometimes 
   referred to as the no-hump camel.



--
Eric P.
efp@etechinc.com
http://www.etechinc.com/
<*** standard disclaimer ***>


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

Date: 15 Mar 1997 10:51:17 -0500
From: Roderick Schertler <roderick@argon.org>
To: rnewman@cybercom.net (Ron Newman)
Subject: Re: Why doesn't flock() work properly on Solaris?
Message-Id: <pz3etx40ri.fsf@eeyore.ibcinc.com>

On 15 Mar 1997 08:08:54 -0500, rnewman@shell1.cybercom.net (Ron Newman) said:
> 
> I'm moving a perl 5.003 script from SunOS to Solaris, and finding
> that my calls to flock() no longer work as expected. Why?

5.003's flock() emulation was deficient, it was using lockf(3) to
emulate flock(2) but they provide different semantics.  Use the 5.004
beta (5.003_93), or wait for 5.004 itself, or do your locking with
fcntl().

> I also have a C program that also calls flock(), and it doesn't
> exhibit any of this weird behavior.

I don't have a Solaris system to check, but I'd bet the flock() the C
program is getting comes from the BSD compatibility library.  Perl
doesn't use this emulation because it doesn't use any functions from
that library (because they are broken in various major ways).

PS:  Your From: header doesn't agree with the address in your signature.

-- 
Roderick Schertler
roderick@argon.org


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

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

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