[10708] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4306 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Nov 27 07:07:24 1998

Date: Fri, 27 Nov 98 04:00:29 -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           Fri, 27 Nov 1998     Volume: 8 Number: 4306

Today's topics:
    Re: ADODB Problems, fix was incorrect, here's the fix's <lss@shaw.wave.ca>
        ANNOUNCE: Class::Tree <Savage.Ron.RS@bhp.com.au>
        ANNOUNCE: DBD::Sybase 0.13 <mpeppler@mbay.net>
        ANNOUNCE: DFA::Command <Savage.Ron.RS@bhp.com.au>
        ANNOUNCE: Getopt::Simple <Savage.Ron.RS@bhp.com.au>
        ANNOUNCE: HTTPi/0.1 package <cdkaiser@concentric.net>
        ANNOUNCE: Lingua-EN-Infinitive <Savage.Ron.RS@bhp.com.au>
        ANNOUNCE: Lingua::EN::Infinitive <Savage.Ron.RS@bhp.com.au>
        ANNOUNCE: Number::Format 1.30 (William R. Ward)
        ANNOUNCE: sybperl 2.10 <mpeppler@datamig.com>
        ANNOUNCE:: VCS::CVS <Savage.Ron.RS@bhp.com.au>
        Announcing DailyUpdate version 4.2 -- integrate dynamic <dwc3q@mamba.cs.virginia.edu>
        Announcing WishPerl <paul@qub.com>
    Re: Bind won't take variables <ebohlman@netcom.com>
    Re: Can you suggest a(n) URL? dave@mag-sol.com
    Re: Change IP Address (David Cantrell)
        debugging forks <fx77@dial.pipex.com>
    Re: embedded while loop problem <maurerf@post.ch>
        File diff <Thomas.Schachner@awd.at>
        Getopt::ExPar-0.01 will be available shortly.... (Harlin L. Hamilton Jr.)
        HELP! need help in regex for multiple word search <kban@pacific.net.sg>
    Re: HELP!!! REAL simple script doesn't work! ptimmins@netserv.unmc.edu
        HELP/QUES: regexp and strings <aahz@writeme.com>
        HTMLgen for perl... (Esmund Xdegerd)
    Re: I think this is a bug in Perl "Ling"@dcs.ed.ac.uk
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Fri, 27 Nov 1998 07:24:48 GMT
From: "LSS" <lss@shaw.wave.ca>
Subject: Re: ADODB Problems, fix was incorrect, here's the fix's fix!
Message-Id: <4ts72.101$Y06.89178@news.rdc1.on.wave.home.com>

My earlier fix was incorrect. Duh!  What was I thinking.  Helps to actually
test the error handling though.  Here is the correct way to do this.  The
error Number is used to distinguish between warnings and errors.

sub dbOpen
{
  my($Cn, $Cm, $Rs, $Errors, $LoadName, $retval);

  $LoadName = $_[3];

 $retval = 0;

  $Cn = CreateObject OLE 'ADODB.Connection';

  if ( $Cn )
  {
    $Cn->{ConnectionTimeout} = 15;
    $Cn->{CommandTimeout} = 30;
    $Cm = CreateObject OLE 'ADODB.Command';

    if ( $Cm )
    {
      $Rs = CreateObject OLE 'ADODB.Recordset';

      if ( $Rs )
      {
        $Cn->Open($LoadName, "", "");

        $Errors = $Cn->Errors();
        $retval = keys %$Errors;

        if ( $retval )
        {
          $retval = 1;
          foreach $error ( keys %$Errors )
          {
            # If number is non zero then it is an error otherwise it is a
warning.
            if ( $error->{Number} != 0 )
            {
              #printf("ADO Error  Number: %08x\n", $error->{Number});
              #printf("ADO Error Message: %s\n", $error->{Description});
              $retval = 0;
            }
          }

          if ( !$retval )
          {
            SetErrMsg("Unable to open ADO connection.");
          }
        }

        if ( $retval )
        {
          $Cm->{ActiveConnection} = $Cn;
          $Cm->{CommandType} = 1;

          $Rs->{CursorType} = 1;
          $Rs->{LockType} = 3;

          $_[0] = $Cn;
          $_[1] = $Cm;
          $_[2] = $Rs;
        }
      }
      else
      {
        SetErrMsg("Unable to create ADO recordset object.");
      }
    }
    else
    {
      SetErrMsg("Unable to create ADO command object.");
    }
  }
  else
  {
    SetErrMsg("Unable to create ADO connection object.");
  }

  return $retval;
}





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

Date: 26 Nov 1998 15:22:10 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: ANNOUNCE: Class::Tree
Message-Id: <73jrn2$6q1$1@news.neta.com>

Perl module Class::Tree V 1.01 is now available from CPAN as
Class-Tree-1.01.tar.gz.

Its PAUSE id is:
Class::Tree    Mdpo C++ class hierarchies & disk directories  RSAVAGE

Uses:
a. When combined with the Perl program 'perceps'
    http://friga.mer.utexas.edu/mark/perl/perceps/
Class::Tree can print all C++ class hierarchies in a set of *.h files.
b. Without perceps, Class::Tree can print disk directories.

Along the way it demonstrates building up deeply nested hash references.


--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage






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

Date: 26 Nov 1998 15:23:17 GMT
From: Michael Peppler <mpeppler@mbay.net>
Subject: ANNOUNCE: DBD::Sybase 0.13
Message-Id: <73jrp5$6qj$1@news.neta.com>

ANNOUNCE: DBD::Sybase 0.13 available on CPAN

The uploaded file

    DBD-Sybase-0.13.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/MEWP/DBD-Sybase-0.13.tar.gz
  size: 35727 bytes
   md5: 37a4f9d18f78940a93bfe46302136f22


DBD::Sybase is a driver for the perl DBI (database interface) module. It
requires the Sybase Open Client library (version 10.0 or later) to
build and run.

This is a bug fix release. If you are using 0.12, or if you are using ? 
style placeholders you should *definitely* upgrade.


>From the CHANGES file:

Release 0.13

	Bug fix release - binding undef (NULL) variables when using
	? style placeholders didn't work.
	Incorrect login didn't get flagged properly (this bug was
	introduced in 0.11.)
	Added database attribute to the connect() call.

Release 0.12

	Bug fix release - recent versions of DBI make an array that
	DBD::Sybase uses read-only, causing errors when multiple
	result sets are retrieved where the second result set is wider 
	(has more columns) than the first one.

Release 0.11

	Adds support for multiple $sth for a single $dbh (this is done 
	by openeing a new connection in prepare() if the previously
	prepared statement is still active.
	Add support for date formatting via $dbh->func($fmt,
	'_date_fmt').
	Added two new connect attributes: scriptName and
	hostname. Setting these can help identify processes in the
	Sybase sysprocesses table.


This version should be available in a day or so from your local CPAN
archive, and is available now from my home page at 
http://www.mbay.net/~mpeppler.

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com




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

Date: 26 Nov 1998 15:22:28 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: ANNOUNCE: DFA::Command
Message-Id: <73jrnk$6q6$1@news.neta.com>

Perl module DFA::Command V 1.90 is now available from CPAN as
DFA-Command-1.90.tar.gz.

Its PAUSE id is:
DFA::Command   Mdpo Discrete Finite Automata/Finite State Machine RSAVAGE

The module contains DFA::Generate & DFA::Command.

DFA::Generate can read your state transition table (STT) and generate a Perl
program which uses DFA::Command.

DFA::Command reads your STT and a data file. Each time data in the data file
matches a regular expression in the STT, a sub in called.

--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage






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

Date: 26 Nov 1998 15:22:39 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: ANNOUNCE: Getopt::Simple
Message-Id: <73jrnv$6q9$1@news.neta.com>

Perl module Getopt::Simple V 1.30 is now available from CPAN as
Getopt-Simple-1.30.tar.gz.

Its PAUSE id is:
Getopt::Simple   Mdpo A simple-to-use interface to Getopt::Long  RSAVAGE

Getopt::Simple provides a wrapper around Getopt::Long.
Some of its advantages are:
1. An easy-to-read format for declaring your options
2. A simple method of initializing your options with default value from the
environment or from within the program
3. A simple method of encouraging users to use command line options in a
certain order, eg username before password
4. A simple method of supplying short or long help test per option.

Note:
I've been discussing this module with Johan Vromans, the author of
Getopt::Long, and am hopeful that some of these ideas will be incorporated
into the major rewrite of Getopt::Long which is nearing completion. If so,
Getopt::Simple might then be retired.

Either way, Getopt::Simple is a gentle introduction to command line option
processing.

--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage






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

Date: 26 Nov 1998 15:21:57 GMT
From: Cameron Kaiser <cdkaiser@concentric.net>
Subject: ANNOUNCE: HTTPi/0.1 package
Message-Id: <73jrml$6pr$1@news.neta.com>

HTTPi/0.1 is an extensible, miniaturized HTTP/0.9, /1.0 and /1.1-compliant
webserver written 100% in Perl and running in under 5K with no additional
modules (doesn't require Socket.pm, Net.pm, LWP, or any networking support
other than what it has built-in). In fact, all you need is the Perl 5
executable and inetd -- nothing else is required.

HTTPi is intended for systems with a need for a small, low-impact server
(it runs through inetd and doesn't spawn daemons), or for people who want
to roll their own web-applications from a bare bone algorithm. With its
small size, invocation time is minimal and execution time is extremely fast.

Supports:

	* executable applications (similar to nph-cgi)
	* HTTP/1.1 persistent connections
	* CERN logging

A configure/install script is included which automates changes to inetd and
builds custom versions.

See HTTPi in action, get documentation and download the current version from

	http://stockholm.ptloma.edu/httpi/

--
Cameron Kaiser * cdkaiser.cris@com * powered by eight bits * operating on faith
 -- supporting the Commodore 64/128:  http://computerworkshops.home.ml.org/ --
   head moderator comp.binaries.cbm * cbm special forces unit $ea31 (tincsf)
personal page http://calvin.ptloma.edu/~spectre/ * "when in doubt, take a pawn"




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

Date: 26 Nov 1998 15:22:51 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: ANNOUNCE: Lingua-EN-Infinitive
Message-Id: <73jrob$6qc$1@news.neta.com>

Perl module Lingua-EN-Infinitive V 1.00 is now available from CPAN as
Lingua-EN-Infinitive-1.00.tar.gz.

Its PAUSE id is:
Lingua::EN::Infinitive Mdpo Find the infinitive form of a conjugated word
RSAVAGE

This module does no more than deconjugate English words. It recognizes all
irregular verbs.
--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage






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

Date: 26 Nov 1998 15:20:58 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: ANNOUNCE: Lingua::EN::Infinitive
Message-Id: <73jrkq$6le$1@news.neta.com>

Lingua-EN-Infinitive-1.00.tar.gz has entered CPAN as:
Lingua::EN::Infinitive	Mdpo	Find the infinitive form of a conjugated word
RSAVAGE

Given a conjugated English with, this module returns 1 or 2 candidates for
the infinitive form of that word.
Besides 'make test' running a lot of tests, you can run test.pl with any
command line parameter, eg 'x', and it will run the same tests but output a
large table of results.
-- 
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage




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

Date: 26 Nov 1998 15:23:53 GMT
From: hermit@cats.ucsc.edu (William R. Ward)
Subject: ANNOUNCE: Number::Format 1.30
Message-Id: <73jrq9$6qr$1@news.neta.com>

Version 1.30 is now available.  Here is the README for more
information.  You can get this from CPAN or from
	ftp://ftp.bayview.com/pub/Number-Format-stable.tar.gz

--Bill.


Number::Format - Convert numbers to strings with pretty formatting

Version: 1.30

WHAT IS IT

Number::Format is a library for formatting numbers.  Functions are
provided for converting numbers to strings in a variety of ways, and
to convert strings that contain numbers back into numeric form.  The
output formats may include thousands separators - characters inserted
between each group of three characters counting right to left from the
decimal point.  The characters used for the decimal point and the
thousands separator come from the locale information or can be
specified by the user.

Also of note is the format_picture command which converts a number
into a string using a "picture" string that you provide.  This is
similar to the PRINT USING statement that some versions of BASIC have.


BUILDING/INSTALLING

Perl version 5.003 or higher is required.  This package is set up to
configure and build like a typical Perl extension.  To build:

        perl Makefile.PL
        make && make test && make install
        make install

NOTE: You may need super-user access to install.


PROBLEMS/BUG REPORTS

Please send any reports of problems or bugs to wrw@bayview.com.


MAILING LIST

We have an electronic mailing list for announcements of new releases
of this module.  To join send mail to majordomo@bayview.com with the
command in the body of the message:

        subscribe number-format-announce


CREDITS AND LICENSES

This package is copyright 1997-8 by William R. Ward <wrw@bayview.com>
and may be distributed under terms of the Artistic License used to
cover Perl itself.  See the file Artistic in the distribution of Perl
5.002 or later for details of copy and distribution terms.


CHANGE HISTORY

version 1.30:

* Fix several major bugs, including the POSIX-not-required issue, as
  well as better support for negative values.
* Add setting for default size of decimal area so you don't have to
  specify the number of digits if it's other than 2.
* Add setting and function to display negative numbers in different
  formats.
* Add setting to force trailing 0's in the decimal portion to fill out
  the number of digits required.
* Fix problem where 0's inside format_picture()'s output were being
  replaced with spaces.
* Add 0 before decimal point if number is between -1 and 1.

version 1.20:

* Make POSIX no longer required (users on MicroSoft systems sometimes
  don't have it); uses US defaults if no POSIX.pm found.
* Add new optional third argument to format_number() to add trailing
  zeroes.

version 1.12:

* Remove 'use of undefined value' warnings when used with perl -w

version 1.10:

* Add object oriented interface and support for POSIX locales.

* NOTE: Some aspects of the API have changed.  Please reread the
  documentation carefully if you used 1.0 previously!!!

Initial version 1.0:

* Limited release beta version.


-- 
William R Ward          Bay View Consulting   http://www.bayview.com/~hermit/
hermit@bayview.com     1803 Mission St. #339        voicemail +1 408/479-4072
hermit@cats.ucsc.edu  Santa Cruz CA 95060 USA           pager +1 408/458-8862
 PGP Key 0x2BD331E5; Public key at http://www.bayview.com/~hermit/pubkey.txt
-----------------------------------------------------------------------------
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Ben Franklin, ~1784




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

Date: 26 Nov 1998 15:20:10 GMT
From: Michael Peppler <mpeppler@datamig.com>
Subject: ANNOUNCE: sybperl 2.10
Message-Id: <73jrja$6l2$1@news.neta.com>

I have just uploaded sybperl 2.10 to PAUSE - it should reach your local
CPAN site in a day or two:

The uploaded file

    sybperl-2.10.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/MEWP/sybperl-2.10.tar.gz
  size: 158091 bytes
   md5: f619a1da0a4c968de12e9a5d458bb21d

Sybperl is a set of modules that add Sybase API calls to perl.
Sybase::CTlib defines a subset of the Sybase OpenClient Client Library
calls, and Sybase::DBlib is a subset of the older DB-Library API.
Neither of these modules are compatible with DBI - you should use
DBD::Sybase for that.

More information on sybperl, including on-line FAQ and man pages, can be 
found at http://www.mbay.net/~mpeppler.

Here are the changes since release 2.09:

2.10    CTlib TEXT/IMAGE handling

	**WARNING**

	Please see the sybperl.pod file for dbpoll() syntax
	changes.

	Added ct_get_data(), ct_send_data(), ct_data_info().
	Added some missing documentation.
	Added Sybase::CTlib::DBDEAD().
	Added Sybase::DBlib::dbcomputeinfo().

	Changed DBlib::dbpoll() to allow polling on a single handle.

	W. Philipp Moore supplied a patch to CTlib/Makefile.PL to 
	link with the Sybase _r (re-entrant) libraries if perl
	was compiled with threading enabled. **THERE IS NO GUARANTEE
	THAT A THREADED VERSION OF Sybase::CTlib WILL WORK CORRECTLY!!!***
	Please read README.thread for details.

	Bug Fixes:

	247: Sybase::DBlib::sql() returns invalid results in $doAssoc mode
	     when multiple result sets are being processed.
	248: cs_dt_info(CS_DT_CONVFMT) doesn't work.
	
2.09_05 DBlib asynch calls

	Added dbpoll(), dbsqlsend() to allow asynchronous calls to Sybase.

	Applied W. Philipp Moore's patch to the nsql() routine.

2.09_04 DBlib dbreg*() calls

	Added dbreg*() calls to allow execution of OpenServer registered
	procedures.

2.09_03 Bug Fixes

	235: Calling DBlib's dbexit() breaks Sybase::DBlib on Win32
	236: Sybase::CTlib doesn't work with OC 11.x on Win32.

2.09_02	Bug Fixes

	233: CTlib dumps core in DESTROY.


2.09_01 Bug Fixes

	This is a bug fix release. The only functional change is in the
	handling of attributes in Sybase::CTlib when using the 
	ct_cmd_alloc() call. If you use that call to open
	multiple cursors on the same connection then you should
	be aware that the attributes are shared between the handles
	opened for this connection (ie the handle created with
	ct_connect() and the handles created with ct_cmd_alloc().)

	Other fixes:

	218: length($buf) is incorrect after dbreadtext().
	223: dbreadtext() leaves garbage at the end of $buf
	224: dbreadtext() missing from Sybase::Sybperl
	226: Changing $user in dblogin() fails on NCR
	228: BCP RECORD_SEPARATOR error
	229: BCP & null_pattern error
	232: SEGV in ctutils.pl when inserting a duplicate row.
	

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@mbay.net       -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com




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

Date: 26 Nov 1998 15:23:04 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: ANNOUNCE:: VCS::CVS
Message-Id: <73jroo$6qe$1@news.neta.com>

Perl module VCS::CVS V 1.00 is now available from CPAN as
VCS_CVS-1.00.tar.gz.

Its PAUSE id is:
VCS::CVS    Rdpo Interface to GNU's CVS       RSAVAGE

This module offers a Perl interface to GNU's Concurrent Versions System CVS.

Some (other) authors are developing superclasses of VCS which will allow
modules like VCS::CVS to be used across the web. This may necessitate
changes to the interface to VCS::CVS.

--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage






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

Date: 26 Nov 1998 15:23:36 GMT
From: David Coppit <dwc3q@mamba.cs.virginia.edu>
Subject: Announcing DailyUpdate version 4.2 -- integrate dynamic data from the internet
Message-Id: <73jrpo$6qm$1@news.neta.com>


DailyUpdate 4.2: DailyUpdate grabs dynamic information from the internet
and integrates it into your webpage. You specify special HTML tags in a
template file, which then get replaced by the acquired data. It's also
easy to extend the script to handle new data sources.

Features include timeouts to handle dead servers without hanging the
script, user-defined update times, modular and extensible design, and
compatibility with cgi-wrap.

To see example output, go to http://www.cs.virginia.edu/~dwc3q/daily.html

Available (soon) on CPAN at:
$CPAN/authors/id/D/DC/DCOPPIT/

(Goto http://www.perl.org/ if you don't know how to get to CPAN.)

Most recent version at http://www.cs.virginia.edu/~dwc3q/code/index.html
Documentation at http://www.cs.virginia.edu/~dwc3q/code/update.html

David

_________________________________________________________________________
David Coppit - Graduate Student        coppit@cs.virginia.edu
The University of Virginia             http://www.cs.virginia.edu/~dwc3q
                "For I am a Bear of Very Little Brain,
             and long words Bother me" - Winnie the Pooh




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

Date: 26 Nov 1998 15:20:30 GMT
From: "Paul at Sunnyvale" <paul@qub.com>
Subject: Announcing WishPerl
Message-Id: <73jrju$6l7$1@news.neta.com>


WishPerl is a pair of two (small) scripts, one in Perl and one in Tcl,
enabling you
of painlessly breeding Perl modules with Tcl/Tk/Tix GUI. Works on Unix with
perl 5.* and on Win32  with YeP-perl. With it's help, you can add Tcl/Tk GUI
to
your Perl program fast, or make a new application with GUI events processed
by some Perl engine, or debug your Tcl script easily.

Available at: http://www.qub.com/group

Rgds. Paul.
paul@qub.com








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

Date: Fri, 27 Nov 1998 08:56:02 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Bind won't take variables
Message-Id: <ebohlmanF32otE.AqM@netcom.com>

Rick Delaney <rick.delaney@shaw.wave.ca> wrote:
: I like the idea that all of the switches be supported this way, but (?o)
: would be kind of silly so maybe there are reasons to never support (?g)
: also?  I doubt I would even ever use it but it seems like the original
: poster would if it was a feature of the language.

One place where it would come in handy: unless I'm missing something, the 
only way to do a repeating match using a regexp pre-compiled with qr// is 
to interpolate it into an ordinary regexp match that has a /g modifier.  
This incurs a (fairly small) speed penalty.  It would be nice to attach 
the "global" property to the regex at compile time.



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

Date: Fri, 27 Nov 1998 11:23:36 GMT
From: dave@mag-sol.com
Subject: Re: Can you suggest a(n) URL?
Message-Id: <73m23e$qt7$1@nnrp1.dejanews.com>

In article <365E2E2C.1AFA670B@micron.net_>,
  _larryf@micron.net_ wrote:
>     Question for Win32 version of Perl:  I have no compiler to setup the
> Perl interpreter, so I downloaded one from the web.  Easy enough.  I
> installed, used... blah blah blah.  It works fine to run the programs
> and spit out the necessary output, but my question is how to access the
> PERL program (cgi, .pl, etc) with a web browser.  It runs the program
> but spits the output to the COMMAND.COM shell.  Which web sites might
> cover this, and explain how to set up my machine to run Perl without
> this problem?
>     I've read through most of the FAQ that I thought would be relevant,
> and a lot on the http://www.perl.com/ and http://www.perl.com/CPAN/
> sites.  I may just have overlooked it.

I *think* that what you need is a web server running on your PC. Download
Apache from <http://www.apache.org>, install it and go for further questions
to a web server or CGI newsgroup.

hth,

Dave...

--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 27 Nov 1998 10:44:30 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: Re: Change IP Address
Message-Id: <3662825a.68059474@thunder>

On Thu, 26 Nov 1998 09:27:19 -0800, "JEFF  GOODE"
<JEFEBUENO@prodigy.net> enlightened us thusly:

>I need a script to change the IP Address in NT from the DOS prompt. Any
>suggestions would be greatly appreciated.

The core of such a script - which will be trivial for you to write -
is Win32::Registry.

Now, I don't s'pose anyone knows how to do that on Win95 _without_
requiring a reboot?

[Copying newsgroup posts to me by mail is considered rude]

-- 
David Cantrell, part-time Unix/perl/SQL/java techie
                full-time chef/musician/homebrewer
                http://www.ThePentagon.com/NukeEmUp


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

Date: Fri, 27 Nov 1998 11:30:32 -0000
From: "TS" <fx77@dial.pipex.com>
Subject: debugging forks
Message-Id: <73m2dq$5da$1@plug.news.pipex.net>

I am working on HP-UX 10.20 and Linux.
I have to debug a program that contains a subroutine with the following
construction:

if (defined(my $pid = open (CHLD, "-|"))
{
    if ($pid == 0)
    {
        #child code
        exit;
    }
    else
    {
        #parent code
        return ($pid, *CHILD);
    }
}
else
{
    #Can't fork code.
}

If I strip the child code out of the program it works fine, but in this
construction it fails under certain circumstances. When I try to debug this
code the debugger seems to stay always in the parent process. Can anyone
tell me how I can get the debugger to debug the child code?

Kees Vonk




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

Date: Fri, 27 Nov 1998 10:32:25 +0100
From: "Felix Maurer" <maurerf@post.ch>
Subject: Re: embedded while loop problem
Message-Id: <73lrkt$a1c@gd2inews.swissptt.ch>

Thanks a lot to both of you.

I'm not so familiar with hash, so I have to go to read the books to figure
out what you are meaning. I did modifiyed my previous program as follow;

@infile=sort <INFILE>;
@x500=sort <X500>;

LINE: foreach $x500(@x500) {
  chomp $x500;
  $uid=substr($x500,26,12);
  $_=$uid;
  s/ //g;
  $uid=$_;
  $oe=substr($x500,332,40);
  foreach $line(@infile) {
    chomp $line;
    @key=split/;/,$line;
    if ($uid eq @key[0]) {
       print ($line,";",$oe,"\n");
       print (OUTFILE  $line,";",$oe,"\n");
       next LINE;
    }
  }
}

The performance is now not too bad. I need about 2 minutes for 18'000
records. I would be very intrested if you could give some to start rewriting
this with hashes.


Eric Bohlman wrote in message ...
>Lee Benfield <lbenfie1@nospamford.com> wrote:
>: I'm sure there's a better way to do it, but why not try:
>
>: # slurp file2 into @file2
>: while (<FILE2>) {
>:   push @file2, $_;
>: }
>
>Can be rewritten as:
>
>@file2=<FILE2>;
>: while (<FILE1>) {
>:   @uid = split/;/,$_;
>:   $uid = $uid[0];
>:   print "Got $uid" if (grep /$uid/, @file2);
>: }
>
>Three points:
>
>1) This will find *any* appearance of $uid in the second file (as long as
>it doesn't cross a line boundary).  This may not be what's needed; it may
>be that it should be matched only when it appears in certain fields.
>
>2) It's slow, because grep is going to continue searching for all matches
>even after it finds the first one.
>
>3) It's slow, because even if 2) could be fixed, it's still going to make
>an average of N * M / 2 comparisons, where N is the number of lines in the
>first fill and M is the number of lines in the second file.  This gets
>very slow very fast as the size of the files increases.  If in fact $uid
>need only be matched at specific positions in the second file, then you
>could populate a hash with the appropriate fields for the second file and
>then do a hash lookup on each $uid from the first file.  This will be
>*much* faster.
>






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

Date: Fri, 27 Nov 1998 08:23:43 +0100
From: Thomas Schachner <Thomas.Schachner@awd.at>
Subject: File diff
Message-Id: <365E537F.B2139F91@awd.at>

I need to compare a Logfile against a file which is the correct master.
If  Logfile =! master than a error mail is sent.
How can i compare to files if they are equeal?

Thanx Thomas


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

Date: 26 Nov 1998 15:21:22 GMT
From: hlhamilt_at_aud_dot_alcatel_dot_com@news01.aud.alcatel.com (Harlin L. Hamilton Jr.)
Subject: Getopt::ExPar-0.01 will be available shortly....
Message-Id: <73jrli$6lm$1@news.neta.com>
Keywords: getopt perl package


Well, just in case you didn't think there weren't enough
Getopt packages available, here's another one.  It's based
loosely on Stephen Lidie's EvaP package.  Please email me
any questions, comments and especially bugs that you find.
I've begun the CPAN registration process, but that can take
a while.  If you're interested in taking a look at this now,
please send an email and I will email you the tar.gz file.
Currently, it is only 18k.


Here's the included README:

              Extended Parameters 0.01 for Perl

    Extended Parameters, Getopt::ExPar, is written as a possible alternative
to current getopt packages.  Based, for the most part, on Stephen Lidie's
Getopt::EvaP package, this has several features that go beyond EvaP's 
capabilities.
 
 - Include a 'set' supertype which allows users to have multiple values for
   a single option.  Like lists, the only type unavailable in sets is switch.
   Also, sets within sets are not allowed.
 
 - All parameter types except switch may be lists and sets.
 
 - Use of ENV, or environment, variables is more flexible.
 
 - Use of abbreviations may be allowed.  The user may abbreviate commands or
   aliases as long as enough of the command is given to make it distinguishable
   from all others.  If not, a message is printed so the user may be more specific.
 
 - Use of 'switchglomming' may be allowed.  This is where multiple single-letter
   switches (either the command or alias must be a single letter) may be glommed,
   or grouped, together as the first option on the command line.
   Ex: script.pl -x -f -c -a arga   may be executed as
       script.pl -xfc -a arga       OR
       script.pl -fxc -a arga
 
------------
INSTALLATION
------------
SOP:
 
        perl Makefile.PL
        make
        make test
        make install
 
This should install to your site_perl directory.
 
------------
AVAILABILITY
------------
 
Will be available on CPAN mirror as soon as I see how it's done.
 
------
AUTHOR
------
 
Harlin L. Hamilton Jr.
Alcatel USA, Richardson, TX
 
hlhamilt_at_aud_dot_alcatel_dot_com
(replace _at_ with '@' and _dot_ with '.', sorry for the inconvenience)

---------
COPYRIGHT
---------
 
Copyright(c) 1998 Harlin L. Hamilton Jr.  All rights reserved.  This program
is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.





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

Date: Fri, 27 Nov 1998 19:28:09 +0800
From: "Kenneth Ban" <kban@pacific.net.sg>
Subject: HELP! need help in regex for multiple word search
Message-Id: <73m2cc$9be$1@newton.pacific.net.sg>

Hi,

    I'm a novice user of Perl, and I'm trying very hard to get a regex for
searching 2 words in a line of test.. i.e.

in line of text 'nature scenery animals birds heron'

i intend to search for 'nature' and 'heron'
so far i've tried /nature|heron/ but it gives me any other line with the
occurence of nature OR heron
hope someone can help me. Thanks in advance...u can email me at
kban@pacific.net.sg

Kenneth
Singapore




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

Date: Fri, 27 Nov 1998 07:48:05 GMT
From: ptimmins@netserv.unmc.edu
Subject: Re: HELP!!! REAL simple script doesn't work!
Message-Id: <73llfi$g8j$1@nnrp1.dejanews.com>

In article <73kpdu$r2s$1@nnrp1.dejanews.com>,
  lkleiner@perfectsolve.com wrote:

> I have apache 1.3.3, RedHat Linux (2.0.36) and am executing this simple
> script. For some reason the script is not reading (or not getting) the
> environment variable. Here's the script:
>
> #!/usr/bin/perl
> print "Conent-type: text/html\n\n";
> print "query string=$ENV{'$QUERY_STRING'}";
>
> The output I receive in the browser is:
>
> query string=
>
> Can anyone explain this. Any help would be GREATLY appreciated.
> Thanks,

use CGI q/:all/;
print header, query_string;

Score another point in favor of using CGI.pm ( sorry Larry :)

Patrick Timmins
$monger{Omaha}[0]

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Fri, 27 Nov 1998 10:36:16 +0000
From: Andrew Collington <aahz@writeme.com>
Subject: HELP/QUES: regexp and strings
Message-Id: <365E80A0.6A716EAC@writeme.com>

Hi there,

I wonder if any of you could help me out with a string manipulation
prolem I'm having, by way of code or helpful pointers?  What I'm wanting
to do is this:

I have a string such as '$phrase="this is a book"', and what I'd like to
do is wrap an html tag around it such as '<span id="bk">this is a
book</span>'.  The only problem is that I'm reading lines from an HTML
file, and whereas I'd like to wrap that tag around any text, I don't
want it going inside any tags already in the line, such as '<img
src="book1.gif" border=0 alt="<span...>this is a book</span> cover"
width=10 heigth=20>' would be a very bad thing.

I know how to substitute strings as in:
'$line=~s/$phrase/<span..>$phrase<\/span>/ig;' but I don't know how to
check to see if that $phrase is in a tag or not, and still output the
full $line (tags and all).

For example, the input line might be:

<td align="center"><img src="1.gif" alt="a book">This is a book.  And in
a book like this there are words.</td>

the $phrase="a book" so the output should be:

<td align="center"><img src="1.gif" alt="a book">This is <span id="bk">a
book</span>.  And in <span id="bk">a book</span> like this there are
words.</td>


If you can help at all I would really appreciate it.  Thanks very much!

Andy


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

Date: 27 Nov 1998 10:44:33 GMT
From: aasmundo@ifi.uio.no (Esmund Xdegerd)
Subject: HTMLgen for perl...
Message-Id: <slrn75t0kg.euu.aasmundo@communalis.ifi.uio.no>

Hi,

I wonder, is there some perl-module which is similar to the HTMLgen module for
python. 

I know there is CGI.pm, HTML::Base and maybe HTML::Simple, but this is not
exactly what I want. Ok, the problem is that I like HTMLgen in python, but I
like perl better, hence I search for something similar for perl. 


Esmund Xdegerd


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

Date: Fri, 27 Nov 1998 07:19:38 GMT
From: "Ling"@dcs.ed.ac.uk
Subject: Re: I think this is a bug in Perl
Message-Id: <199811270719.HAA11919@keisgaig.dcs.ed.ac.uk>



 tadmc@flash.net (Tad McClellan) wrote
>                                                                   ^
>   You should tremble in anticipation of looking foolish whenever
>   you find yourself invoking that "B" word.
>
>   Then you stop and think about it some more, try some variations,
>   do some word searches in the docs and
>
>   *then* you go ahead and post it.
>
>   You may still end up being embarrassed, but it will happen
>   less often  ;-)
>

OK, it's not a bug, it's a feature!

Thanks to all those who give elaborate response to my
original posting. I've learnt my lesson well from the
first encounter with this newsgroup.

bl at-symbol dcs.ed.ac.uk
(or just reply to this newsgroup is u'd like to embarass me publicly)


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

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


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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

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