[8089] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1707 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 22 19:17:22 1998

Date: Thu, 22 Jan 98 16:00:25 -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           Thu, 22 Jan 1998     Volume: 8 Number: 1707

Today's topics:
    Re: ? random text string <jdporter@min.net>
        announce Text::Format was Manip (Gabor)
        ANNOUNCE: Date::Manip 5.21 and 5.30 (Sullivan N. Beck)
        ANNOUNCE: HTML::FormatNroff 0.10 (Frederick Hirsch)
        ANNOUNCE: Net::LDAPapi v1.40 (Unix & NT) <qa1049@ilms04.cig.mot.com>
        ANNOUNCE: nsapi_perl/Netscape::Server v0.15 <bsugars@canoe.ca>
        Command line file editing/substitution (Spike Hernandez)
    Re: Cwd pragma/realpath conflict? (Martien Verbruggen)
    Re: DOS: command line wildcards <rpsavage@ozemail.com.au>
        Fun Test Coverage Analysis for C/C++ <pritikin@mindspring.com>
        Help w/ regexp <doug1@weboneinc.com>
        How can i find files in dir. <seong@cse.bridgeport.edu>
    Re: How can i find files in dir. <none@nowhere.net>
        Install Trouble. <ed@ipcc.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 22 Jan 1998 18:15:32 -0500
From: John Porter <jdporter@min.net>
Subject: Re: ? random text string
Message-Id: <34C7D314.1B40@min.net>

Lars Kr. Lundin wrote:
> 
> Can anybody tell me how to produce a random text string that matches
> /^\w{8}$/ ?
> 
> I would be surprised if it is difficult...

Sure.
	$_ = substr(('0'x8)!vi.int(rand 100000000),-8);

Btw, you need to rethink your .sig, buddy.

> 
> Thanks,
> Lars.
> --
> M.Sc. Lars Kr. Lundin.                           | Problems worthy
> IMM, Technical University of Denmark.            |  of attack
> Phone (Office) +45 4525 3079, Fax +45 4593 2373. | prove their worth
> E-mail: lkl@runge.uni-c.dk                       |  by hitting back
> URL: http://www.imm.dtu.dk/~lkl/                 |       -Piet Hein
> 
> Currently stationed at:
>     Department of Computer Science
>     University of Minnesota
>     6-210 EE/CS Building
>     200 Union Street SE
>     Minneapolis, MN 55455
>     USA
>     Phone: +1 612 626 0071
>     Fax:   +1 612 625 0572


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

Date: 22 Jan 1998 23:24:43 GMT
From: gabor@vinyl.quickweb.com (Gabor)
Subject: announce Text::Format was Manip
Message-Id: <6a8kfr$9ho$1@news1.teleport.com>

I'd like to announce the release to CPAN my Perl module Text::Format.
It's a basic formatting module(object oriented).  The main routines
are wrap(), fill(), and center().
It's still in beta, so pelase report bugs. :-)
Here is the pod2text output

NAME
    Text::Format - Various subroutines to manipulate text.

SYNOPSIS
        use Text::Format;

        $text = Text::Format->new({
            columns        => 72,
            tabstop        =>  8,
            firstIndent    => "\t",
            bodyIndent     => '',
            rightFill      => 0,
            rightAlign     => 0,
            leftMargin     => 0,
            rightMargin    => 0,
            expandTabs     => 0,
            extraSpace     => 0,
            abbrevs        => {}, # reference to a hash
            text           => [], # reference to a list
            hangingIndent  => 0,
            hangingText    => [], # reference to a list
        }); # these are the default values

        $text = Text::Format->new();
        print $text->wrap(@text);
        print $text->fill(@text);
        print $text->center(@text);
        print $text->wrap([<FILEHANDLE>]);
        print $text->fill([<FILEHANDLE>]);
        print $text->expand(@text);
        print $text->unexpand(@text);

        $text = Text::Format->new
            ({tabstop => 4,bodyIndent => "\t",text => \@text});
        print $text->wrap();
        print $text->fill();
        print $text->center();
        print $text->expand();
        print $text->unexpand();

        print Text::Format->new->wrap(@text);
        %abbr = (foo => 1, bar => 1);
        $text->abbrevs(\%abbr);
        $text->abbrevs();
        $text->abbrevs(qw/foo bar/);
        $text->text(\@text);

        $text->columns(132);
        $text->tabstop(4);
        $text->expandTabs(1);
        $text->extraSpace(1);
        $text->firstIndent("\t\t");
        $text->bodyIndent("\t"
        $text->config({tabstop => 4,firstIndent => ''});
        $text->rightFill(0);
        $text->rightAlign(0);


DESCRIPTION
    The wrap routine will wrap under all circumstances even if the width
    isn't enough to contain the longest words. Text::Wrap will die under
    these circumstances which isn't quite desirable in my opinion. If
    columns is set to a small number and words are longer than that and the
    leading 'whitespace' than there will be a single word on each line. This
    will let you make a simple word list which could be indented or right
    aligned. There is a chance for croaking if you try to subvert the
    module. General setup should be explained with the below graph.

                                  Columns
    <------------------------------------------------------------>
    <---------><----->                                <---------->
    Left Margin Indent                                Right Margin


    wrap @ARRAY || \@ARRAY || [<FILEHANDLE>] || NOTHING
        Allows to do basic formatting of text into paragraphs, with indent
        for first line and following lines separately. Can specify tab size
        and columns, width of total text, right fill with spaces and right
        align, right margin and left margin. Strips all leading and trailing
        whitespace before proceding. If right alignment is set or tab
        expansion is set or hanging indents is set then all tabs are
        expanded to spaces.

    fill @ARRAY || \@ARRAY || [<FILEHANDLE>] || NOTHING
        Considers each element of text as a paragraph and if the indents are
        the same for first line and the rest of the lines then they are
        separated by a single empty line otherwise they follow one under the
        other. If hanging indent is set then a single empty line will
        separate each paragraph as well. Calls wrap to do the actual
        formatting.

    center @ARRAY || NOTHING
        Centers a list of strings in @ARRAY or internal text. Empty lines
        appear as, you guessed it, empty lines. Center strips all leading
        and trailing whitespace before proceding. Left margin and right
        margin can be set.

    expand @ARRAY || NOTHING
        Expand tabs in the list of text to tabstop number of spaces in
        @ARRAY or internal text.

    unexpand @ARRAY || NOTHING
        Tabstop number of spaces are turned into tabs in @ARRAY or internal
        text.

    columns NUMBER || NOTHING
        Set width of text or retrieve width. This is total width and
        includes indentation and the right and left margins.

    tabstop NUMBER || NOTHING
        Set tabstop size or retrieve tabstop size.

    rightFill 0 || 1 || NOTHING
        Set right fill to true or retrieve its value.

    rightAlign 0 || 1 || NOTHING
        Set right align to true or retrieve its value.

    leftMargin NUMBER || NOTHING
        Set or get width of left margin.

    rightMargin NUMBER || NOTHING
        Set or get width of right margin.

    expandTabs 0 || 1 || NOTHING
        Expand leading tabs to spaces, or in case of center, expand internal
        tabs. Returns current setting of attribute.

    abbrevs \%HASH || @ARRAY || NOTHING
        Add to the current abbreviations, takes a reference to your array,
        if called a second time the original reference is removed. Returns
        the current INTERNAL abbreviations.

    extraSpace 0 || 1 || NOTHING
        Add extra space after end of sentence, normally wrap would add 1
        space after end of sentence, if this is set to 1 then 2 spaces are
        used.

    hangingText \@ARRAY || NOTHING
        The text that will be displayed in front of each paragraph, if you
        call wrap than only the first element is used, if you call fill then
        fill cycles through all of them. If you have more paragraphs than
        elements in your array than the first one will get reused. Pass a
        reference to your array.

    hangingIndent 0 || 1 || NOTHING
        Use hanging indents in front of a paragraph, returns current value
        of attribute.

    config \%HASH
        Allows the configuration of all object attributes at once.

    text \@ARRAY || NOTHING
        Pass in a reference to your text that you want the routines to
        manipulate. Returns the text held in the object.


EXAMPLE
        use Text::Format;

        $text = new Text::Format;
        $text->rightFill(1);
        $text->columns(65);
        $text->tabstop(4);
        print $text->wrap("a line to format to an indented regular
                paragraph using 65 character wide display and a
                tabstop of 4");
        $text->expandTabs(1); # tab will be expanded to spaces
        print $text->fill("paragraph one","paragraph two");
        print $text->center("hello world","nifty line 2");
        print $text->expand("\t\thello world\n","hmm,\twell\n");
        print $text->unexpand("    hello world\n","    hmm");
        $text->config({columns => 132, tabstop => 4});


BUGS
    Line length can exceed columns specified if columns is set to a small
    number and long words plus leading whitespace exceed column length
    specified. Actually I see this as a feature since it can be used to make
    up a nice wordlist.

AUTHOR
    Gabor Egressy <gabor@vmunix.com>, some suggestions for improvement by
    Tom Phoenix, Brad Appleton, Byron Brummer, and Andreas Koenig

    Copyright (c) 1998 Gabor Egressy. All rights reserved. All wrongs
    reversed. This program is free software; you can redistribute and/or
    modify it under the same terms as Perl itself.

TODO
        Add the following features :

        1.  support for non-breaking whitespace
            - use hash to store the regex on which not to break eg.
              %hash = ('Mrs?\.' => '^\S+$');


gabor.
--
    Chip Salzenberg sent me a complete patch to add System V IPC (msg,
    sem and shm calls), so I added them.  If that bothers you, you can
    always undefine them in config.sh.  :-)
        -- Larry Wall in <9384@jpl-devvax.JPL.NASA.GOV>




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

Date: 22 Jan 1998 23:23:15 GMT
From: sbeck@cise.ufl.edu (Sullivan N. Beck)
Subject: ANNOUNCE: Date::Manip 5.21 and 5.30
Message-Id: <6a8kd3$9ct$1@news1.teleport.com>


This is to announce that Date::Manip 5.21 and 5.30 have been released to CPAN.

5.21 fixes the broken test suite (it broke when we hit 1998).  It will not
break again in the future.  It also fixes a few bugs and has some improvements
over 5.20, most notably it passes taint checks and is about 25% faster.

5.30 has an important incompatibility with 5.21 .  The delta has an additional
field (a week field was added so it is now year:month:week:day:hr:min:sec). A
new function (Delta_Format) is now provided to extract information from a delta
in a similar fashion to using UnixDate to extract information from a date.

5.30 also has a nice, new feature.  It can return a list of dates for a
recurring event (i.e. 2nd tuesday of every month or every 5 hours 30 minutes).

As always, the module is available from my home page and CPAN within a day or
two.

Here's the README file:



Copyright (c) 1995-1998 Sullivan Beck. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

For information on installing Date::Manip, see the INSTALL file included in
the distribution.

Please send questions or bug reports to me rather than posting them to
a newsgroup since I may miss them there, BUT read the next paragraph
before you automatically start firing off email to me!

If you have questions about Date::Manip, refer to the Date::Manip man page
included as pod documentation in the Manip.pm file.  Don't know what I'm
talking about?  Read the perlpod man page.  Alternately, an online version
of the Date::Manip man page is included in my home page given below.
PLEASE read the man page thoroughly before posting any questions about
Date::Manip to a newsgroup or emailing me.  If you've done this, I'll be
glad to answer any questions not covered in the man page.


** IMPORTANT NOTE **
The internal format of a delta has changed (a week field has been added).
I realize that this is going to cause some problems, but I am adding two
other types of data (granularity and recurrence) to Date::Manip.  Both
will resemble a delta, and both will have week fields, and I wanted all three
to be as similar as possible.  You should use Delta_Format to extract
information from a delta from now on rather than doing it manually.  This is
especially important since the format for a delta will be changed again in one
of the next versions from Y:M:W:D:H:MN:S to Y:M:W:D:H:MN:S*FLAGS.

I also plan on changing the internal format for a date to include
the timezone ( YYYYMMDDHH:MN:SS+HHMN ).  Using UnixDate to extract information
from a date is recommended.


Notes for version 5.30:
  *** Deltas now have a week field: Y:M:W:D:H:Mn:S
  *** Added ParseRecur.
  Added the Delta_Format function.
  Added Date_SetDateField function.
  All routines now handle 2 or 4 digit years.

Notes for version 5.21:
  Now passes taint checks (for 5.004_03 ... I haven't checked 5.004_04
    which apparently does better taint checking).
  Several speedups (significantly faster now).
  Added some config variables:
    YYtoYYYY, UpdateCurrTZ, TomorrowFirst
  Added the Date_NearestWorkDay function
  Some minor bugfixes.
  Fixed handling of ISO 8601 weeks 01, 52, and 53 (and added %G and %L formats
    to UnixDate to acommadate this).
  Better handling of foreign languages (now handles accents reasonably well).
  Several minor additions to parsing formats:
    British date formats
    Added Sept as a valid abbreviation
    Time can be written as 5pm
  Added ForceDate variable.
  Tests now work for all years.

Notes for version 5.20:
  *** Added ISO 8601 date formats.
  Added ParseDateString for speed.
  Changed week handling to meet ISO 8601 standards.
  Added %J and %K UnixDate formats.
  Added some speedups (more to come).
  Added more Parse formats:
     last day in mmm in YY             "last day of October"
     dofw                              "Friday" (Friday of current week)
     Nth                               "12th", "1st" (day of current month)

Backwards incompatibilities:

  Version 5.30
    The internal format of a delta has changed.  This will cause some people
       problems.  Use the routine Delta_Format to extract information from
       a delta.

  Version 5.21
    When running processes (running over time zone changes).  See UpdateCurrTZ
       documentation.
    The UnixDate formats %W and %U no longer return week 00.

  Version 5.20
    Some old formats were removed since they conflicted with ISO 8601
       formats.  MM-DD-YY (conflicts with YY-MM-DD), YYMMDD (conflicts
       with YYYYMM).
    Weekdays are now numbered 1-7 (mon-sun) instead of 0-6 (sun-sat)
    By default the week now starts with Monday instead of Sunday to meet
       ISO 8601.  The FirstDay variable can be set to 7 to set Sunday as
       the first day.
    By default, the 1st week of the year contains Jan 4 (ISO 8601).  See
       the Jan1Week1 variable for overriding this.

  ############################################################################
  If you would like to stay informed about future versions of this module,
  and especially if you are interested in beta testing future versions,
  please let me know by email at:
    sbeck@cise.ufl.edu

  The newest version (which should be considered a beta version) is available
  through my home page:
    http://www.qtp.ufl.edu/~beck
  Feel free to try it out.

  The current (non-beta) version of this module is available from you nearest
  CPAN site and is NOT available from my home page.  I will announce new
  (non-beta) releases in comp.lang.perl.misc and comp.lang.perl.announce.
  ############################################################################


This is a set of routines designed to make any common date/time
manipulation easy to do.  Operations such as comparing two times,
calculating a time a given amount of time from another, or parsing
international times are all easily done.

Date::Manip deals only with the Gregorian calendar (the one currently in
use).  The Julian calendar defined leap years as every 4th year.  The
Gregorian calendar improved this by making every 100th year NOT a leap
year, unless it was also the 400th year.  The Gregorian calendar has been
extrapolated back to the year 1000 AD and forward to the year 9999 AD.
Note that in historical context, the Julian calendar was in use until 1582
when the Gregorian calendar was adopted by the Catholic church.  Protestant
countries did not accept it until later; Germany and Netherlands in 1698,
British Empire in 1752, Russia in 1918.  Note that the Gregorian calendar
is itself imperfect.  Each year is on average 26 seconds too long, which
means that every 3,323 years, a day should be removed from the calendar.
No attempt is made to correct for that.

Date::Manip is therefore not equipped to truly deal with historacle dates,
but should be able to perform (virtually) any operation dealing with a
modern time and date.

Among other things, Date::Manip allow you to:

1.  Enter a date and be able to choose any format conveniant

2.  Compare two dates, entered in widely different formats to determine
    which is earlier

3.  Extract any information you want from ANY date using a format string
    similar to the Unix date command

4.  Determine the amount of time between two dates

5.  Add a time offset to a date to get a second date (i.e. determine the
    date 132 days ago or 2 years and 3 months after Jan 2, 1992)

6.  Work with dates with dates using international formats (foreign month
    names, 12/10/95 referring to October rather than December, etc.).

7.  To find a list of dates where a recurring event happens.

Each of these tasks is trivial (one or two lines at most) with this package.

Although the word date is used extensively here, it is actually somewhat
misleading.  Date::Manip works with the full date AND time (year, month,
day, hour, minute, second, and will ignore fractional seconds).

In the documentation below, US formats are used, but in most (if not all)
cases, a non-English equivalent will work equally well.

EXAMPLES:

1.  Parsing a date from any conveniant format

  $date=&ParseDate("today");
  $date=&ParseDate("1st thursday in June 1992");
  $date=&ParseDate("05/10/93");
  $date=&ParseDate("12:30 Dec 12th 1880");
  $date=&ParseDate("8:00pm december tenth");
  if (! $date) {
    # Error in the date
  }

2.  Compare two dates

  $date1=&ParseDate($string1);
  $date2=&ParseDate($string2);
  if ($date1 lt $date2) {
    # date1 is earlier
  } else {
    # date2 is earlier (or the two dates are identical)
  }

3.  Extract information from a date.

  print &UnixDate("today","The time is now %T on %b %e, %Y.");
  =>  "The time is now 13:24:08 on Feb  3, 1996."

4.  The amount of time between two dates.

  $date1=&ParseDate($string1);
  $date2=&ParseDate($string2);
  $delta=&DateCalc($date1,$date2,\$err);
  => 0:0:DD:HH:MM:SS   the days, hours, minutes, and seconds between the two
  $delta=&DateCalc($date1,$date2,\$err,1);
  => YY:MM:DD:HH:MM:SS  the years, months, etc. between the two

  Read the documentation in the man page for an explanation of the difference.

5.  To determine a date a given offset from another.

  $date=&DateCalc("today","+ 3hours 12minutes 6 seconds",\$err);
  $date=&DateCalc("12 hours ago","12:30 6Jan90",\$err);

  It even works with business days:

  $date=&DateCalc("today","+ 3 business days",\$err);

6.  To work with dates in another language.

  &Date_Init("Language=French","DateFormat=non-US");
  $date=&ParseDate("1er decembre 1990");

7.  To find a list of dates where a recurring event happens.

  # To find the 2nd tuesday of every month
  @date=&ParseRecur("0:1*2:2:0:0:0",$base,$start,$stop);

NOTE: Some date forms do not work as well in languages other than English,
but this is not because DateManip is incapable of doing so (almost nothing
in this module is language dependent).  It is simply that I do not have the
correct translation available for some words.  If there is a date form that
works in English but does not work in a language you need, let me know and
if you can provide me the translation, I will fix DateManip.

For documentation on all of the date manipulation routines, read the
man page.

AUTHOR

Sullivan Beck (sbeck@cise.ufl.edu)

------------------------------------------------------------------------------
Sullivan Beck                      http://www.cise.ufl.edu/~sbeck/
 sbeck@cise.ufl.edu  | This space reserved for some saying demonstrating great
 PH : (352) 392-1057 | wisdom, wit, or insight.  I'll fill it in just as soon
 Fax: (352) 392-1220 | as I have any of the above.
------------------------------------------------------------------------------




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

Date: 22 Jan 1998 23:19:25 GMT
From: fjh@opengroup.org (Frederick Hirsch)
Subject: ANNOUNCE: HTML::FormatNroff 0.10
Message-Id: <6a8k5t$9aj$1@news1.teleport.com>

Announcing: HTML::FormatNroff

I have uploaded the first (beta) version of FormatNroff to CPAN.
This is a set of modules which allow you to convert HTML to
nroff with -man macros, using tbl to handle tables. It builds on
HTML::Formatter and HTML::Parse, requiring perl 5.004.

Available at
  http://www.perl.com/CPAN/modules/by-module/HTML/FormatNroff-0.10.tar.gz

The README follows.

< Frederick
-------------------------


FormatNroff

Copyright (c) 1998 Frederick Hirsch

This library is free software; 
you can redistribute it and/or modify it under the same terms as Perl itself. 

WARNING: THIS IS Beta SOFTWARE. IT IS POSSIBLY UNRELIABLE!

It requires perl 5.004, since it assumes that version of the HTML::Formatter
module.

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

The purpose of this software is to provide a means to automatically
convert HTML to nroff source, using tbl to support tables.

This work is based upon the HTML::Formatter and HTML::Parse modules.

This software package is *NOT COMPLETE*, see the ToDo file.

Available POD Documentation (see perldoc,pod2html,etc):

HTML::FormatNroff.3
HTML::FormatNroffSub.3
HTML::FormatTable.3
HTML::FormatTableCell.3
HTML::FormatTableCellNroff.3
HTML::FormatTableNroff.3
HTML::FormatTableRow.3
HTML::FormatTableRowNroff.3
HTML::Testing.3

=====================================================================

INSTALLING:

perl Makefile.PL
make
make test
make install (If all tests pass)

PROBLEMS:
Mail me (f.hirsch@opengroup.org) the following info:

1. The output of:

    perl Makefile.PL           (do a make realclean first)
    make
    make test

2. The output of:
    perl -V


-- 
Frederick J. Hirsch (f.hirsch@opengroup.org)




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

Date: 22 Jan 1998 23:22:30 GMT
From: Clayton Donley <qa1049@ilms04.cig.mot.com>
Subject: ANNOUNCE: Net::LDAPapi v1.40 (Unix & NT)
Message-Id: <6a8kbm$9cl$1@news1.teleport.com>

Hello Everyone,

I have uploaded the latest version of the Net::LDAPapi module to PAUSE
and my web page, http://miso.wwa.com/~donley/.

This module allows users to manipulate and search an LDAP enabled
directory from Perl.  The module is written mostly in C and has been
tested on various flavors of Unix with excellent results.  The latest
versions also support NT.

Version 1.40 contains major enchancements, including Perl-OO methods for
all the major API functions.  There are also a number of major bug
fixes.

Special thanks to everyone who contributed bug reports, fixes, and ideas
for improvement.

Please send any questions, comments, or bug reports to 'donley@wwa.com',
as well as the Perl newsgroups.

Clayton



====================================
Changes Since Last Announced Version
====================================

1.40 Wed Jan 21 11:12:24 CST 1998
 - I never did include the new version of web500.pl that supports
   Add functionality.  It did exist, and I've included it with this
   release.
 - There was a bug when adding or modifying a record where the value
   was set to be an integer.  The bug has probably existed since a very
   old version of the module.  It has now been fixed.
 - Fix to internal rebind process for Netscape API users provided by
   Rob Weltman <rweltman@netscape.com> of Netscape.

1.40beta Tue Jan 13 14:54:13 CST 1998
 - Wow, what hasn't changed in this version...
 - Removed the extra 'free' in ldap_get_dn that was submitted as
   a fix to a memory leak.  The fix seems to give inconsistent results
   on different platforms and APIs.
 - Added Perl-OO methods for virtually all API calls.  The C style
   API calls still work, and will work in all future versions.
   Note that I haven't added named arguments yet, so argument order
   matters.  This should be in the next version.
 - Manpages completely rewritten.  Please send me any errors or typos.
 - All examples except the two web ones have been rewritten to run under
   'use Strict'.
 - Test program and all examples except web500.pl have been rewritten
   to use Perl-OO methods.  Might need to clean-up comments and code
   after so many rewrites.
 - Minor bugfixes to web500.pl




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

Date: 22 Jan 1998 23:17:32 GMT
From: Benjamin Sugars <bsugars@canoe.ca>
Subject: ANNOUNCE: nsapi_perl/Netscape::Server v0.15
Message-Id: <6a8k2c$95v$1@news1.teleport.com>

Hello,

Version 0.15 of nsapi_perl/Netscape::Server has been added to the
CPAN.  It is available as:
  file: $CPAN/authors/id/BSUGARS/nsapi_perl-0.15.tar.gz
  size: 37343 bytes
   md5: d70bdc6ad7272ffb5165d37d913e1c5f

nsapi_perl is a set of Netscape Server API functions and Perl
extension modules that (in the spirit of mod_perl for Apache) embed a
Perl interpreter in a Netscape web server.  This allows you to program
to the Netscape server API in Perl rather than C.

Changes since version 0.10:

    -Added the module Netscape::Registry.  This module is similar in
    concept and execution to Apache::Registry: it runs Perl CGI
    programs from within the server process offering large
    performance gains.

    -Added the module Netscape::Server::Socket. Its primary role is
    for use with Netscape::Registry.

    -Added the net_read() method to Netscape::Server::Session.

    -Various bug fixes.

Please note that this software is very much under development.  It is
probably of most interest to those wishing to contribute to the
project.

-Ben

--
Ben Sugars <bsugars@canoe.ca>
Senior Webmaster,
CANOE Canadian Online Explorer,
http://www.canoe.ca/




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

Date: Thu, 22 Jan 1998 23:28:18 GMT
From: webmaster@gardenweb.com (Spike Hernandez)
Subject: Command line file editing/substitution
Message-Id: <34c7d30c.13919841@news.digex.net>

I need to change the format of date strings in a the lines of many
files. I would like to do it from the command line.

This is my command line :

perl -p -i -e "s/( on [A-Z][a-z][a-z])[a-z]+(, [A-Z][a-z][a-z])[a-z]+(
\d+, )19(\d\d at )/$1$2$3$4/;" filename

What happens is that the pattern is matched, but nothing substituted,
so the matched string is just deleted.

even when I reduce it to something simple like:

perl -p -i -e "s/(fred)\w+/$1/;" filename

	...there is no substitution.

Can you not use the $1 type variables when doing this from the command
line?

I have checked the man pages and the FAQ. If this is in there,  I
couldn't find it.

Any help woulf be greatly appreciated!

Spike Hernandez

webmaster@gardenweb.com



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

Date: 22 Jan 1998 22:54:31 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Cwd pragma/realpath conflict?
Message-Id: <6a8in7$bid$1@comdyn.comdyn.com.au>

In article <34C6C429.5616@cruzio.com>,
	Chuck Sheldon <csheldon@cruzio.com> writes:
>   Have you seen the symptoms generated by the following script?

Displays the same problems for me.

>   If so, please clue me in to what causes it.

I don't, but you might want to submit it as a bug with perlbug, and see what
happens.

>   I have only run the script under Solaris on a Sun system.

Same for me. 

> perl -v
This is perl, version 5.004_04 built for sun4-solaris

> uname -sr
SunOS 5.5.1

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd.       | things get worse.
NSW, Australia                      | 


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

Date: Fri, 23 Jan 1998 09:52:10 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: DOS: command line wildcards
Message-Id: <34C7DBAA.4AB@ozemail.com.au>

[snip]
> Most archives will have this stuff or just search for "djgpp".
> GNU for DOS is at:
ftp://ftp.cygnus.com/pub/gnu-win32/latest

-- 
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au


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

Date: 22 Jan 1998 23:20:23 GMT
From: Joshua Pritikin <pritikin@mindspring.com>
Subject: Fun Test Coverage Analysis for C/C++
Message-Id: <6a8k7n$9bg$1@news1.teleport.com>

Scans C/C++ source (before cpp) and inserts trip-wires in each code
path to record execution.  Careful use of this tool can help you
eliminate all bugs from your code.  (It really is fun too.  :-)


Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
Devel::CCov    bdcO  Fun Test Coverage Analysis for C/C++         JPRIT

Get it via http://www.perl.com/CPAN/authors/id/JPRIT/ !


WARNING: As far as I know, this package works correctly.  However,
don't make the mistake of considering it anything more than a beta
release!


##################
# RECENT CHAN@ES #
##################


** 01-18-98 RELEASE 0.07

- Minor tweaks.

- Switch statements are instrumented with less overkill when possible.

- Fixed release dates time-warp.


** 01-17-98 RELEASE 0.06

- Exceptional/fatal cases are ignored by default, but can be enabled
with a command line switch (-f).

- Fixed C++ support and stats overlap.

- Added a patch for Makefile.PLs.




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

Date: Thu, 22 Jan 1998 17:38:34 -0500
From: Douglas Clifton <doug1@weboneinc.com>
Subject: Help w/ regexp
Message-Id: <34C7CA6A.20B9D23B@weboneinc.com>

I'm trying to figure out a way to match a range of numbers.
I know about the [0-9] syntax, but the numbers would be
more like 15-31, [15-31] does not work.

I know this is not that difficult to do, the problem is the
range is not known untill run-time and would be in
scalar variables like $beg and $end.

TIA

--
Douglas Clifton
Unix/C/Perl/CGI/HTML Programmer

===================
Web One Inc.
Website Development
Phone: 888-699-WEB1
Phone: 616-552-9999
Fax:   616-552-9920
sales@weboneinc.com
www.weboneinc.com
===================




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

Date: Wed, 21 Jan 1998 17:44:32 -0500
From: "Seong. Kim" <seong@cse.bridgeport.edu>
Subject: How can i find files in dir.
Message-Id: <34C67A50.327@cse.bridgeport.edu>

Hello, there.
Whoever interested in my question, I will be appreciated.

My question is that How can i find files with extention 'html' or
'htm'.  I wrote humble and small code for that.  If you can check and
find right code for specific line, I will be happy.

sub find_file_dir{
    local ($locdir) = @_;
    local (@locfile, $rdir);
    local ($eone);
    local (*OD);
    $locdir = $locdir."/";                 
    chdir $locdir;			   		<-------??????	
    opendir(OD, $locdir) || die "can't open $locdir";   <-------??????
    @locfile = readdir(OD);
    foreach $eone (sort @locfile){
        if  (-d $eone) {   #&& ($eone=~/^\.$/ or $eone =~/^\.\.$/)){
            unless($eone=~/^\.$/ or $eone =~/^\.\.$/){
                   &find_file_dir($locdir.$eone);
            }
??----> } elsif ( $eone = ~ /(\.HTML|\.HTM)$/){        <--------????????
            print "$locdir$eone\t";
        } else {
               ;
        }
    }
    chdir "..";     <----------???????????
    close (OD);
}


As you can see from my subroutine, this will search all of html and htm
files on specific dir recursively.
Please help me to make this subroutin work.
bye

Sincerely
Seong y. Kim


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

Date: Thu, 22 Jan 1998 17:33:35 -0600
From: adam <none@nowhere.net>
Subject: Re: How can i find files in dir.
Message-Id: <34C7D74F.D688EA9C@nowhere.net>

you can say: 
	
	opendir DIR, "$path_to_directory";
	@files = readdir (DIR);
	closedir DIR;
	
	@html_files = grep { /.htm/i } @files;

as long as $path_to_directory is the full path, and then forget that
chdir stuff, or that pattern matching stuff, i don't know what you are
trying to do with it. 
if all you want to do is get an array with htm or html files in it from
a directory then the above will work.

adam


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

Date: Thu, 22 Jan 1998 17:53:59 -0500
From: "Edward D. Silver" <ed@ipcc.com>
Subject: Install Trouble.
Message-Id: <34C7CE07.B0043EB0@ipcc.com>

Last time I installed PERL 5.001 it was a breeze.  Now I'm trying to
install PERL 5.004 on a new DEC ALPHA running Digital Unix v4.0D.

I keep getting the errors listed below:
Okay, let's see if #! works on this system...
Configure: ./try: cannot execute
Configure: ./try: cannot execute
It's just a comment.

Checking out how to guarantee sh startup...
Let's see if ': use /bin/sh' works...
Configure: ./try: cannot execute
Nope.  You may have to fix up the shell scripts to make sure sh runs
them.

Locating common programs...
Configure: ./loc: cannot execute
I don't know where 'awk' is, and my life depends on it.
Go find a public domain implementation or fix your PATH setting!

Any ideas - Please help!  Respond to eds@ipcc.com



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

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

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