[18075] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 235 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 7 18:06:49 2001

Date: Wed, 7 Feb 2001 15:05:34 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <981587132-v10-i235@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 7 Feb 2001     Volume: 10 Number: 235

Today's topics:
    Re: "Average of List of Numbers" by Abigail (Monte Phillips)
        [ANNOUNCE] XML::Records 0.01 (Eric Bohlman)
    Re: a bug in perl-5.6.0? <mischief@velma.motion.net>
    Re: Again---how to remove item in the array? <joe+usenet@sunstarsys.com>
    Re: Again---how to remove item in the array? (Richard J. Rauenzahn)
        ANNOUNCE:  DDL::Oracle v1.00 <rvsutherland@yahoo.com>
        ANNOUNCE:  mywebget-2001.0105.pl Perl wget(1) batch dow (Jari Aalto+mail.perl)
        ANNOUNCE: Mail::IMAPClient v2.0.9 <david.kernen@bms.com>
        ANNOUNCE: OpenInteract Web Application Server <cwinters@optiron.com>
        ANNOUNCE: Perl for Windows CE <rkeuc@allgeier.net>
        ANNOUNCE: Regexp::Common 0.01 (Damian Conway)
        ANNOUNCE: Spreadsheet::WriteExcel 0.26 (John McNamara)
        ANNOUNCE: Text::Balanced 1.83 (Damian Conway)
        ANNOUNCE: Text::Wrap 2001.0131 (David Muir Sharnoff)
        ANNOUNCE: Tie::RegexpHash v0.10 <wlkngowl@unix.asb.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 07 Feb 2001 21:13:49 GMT
From: montep@hal-pc.org (Monte Phillips)
Subject: Re: "Average of List of Numbers" by Abigail
Message-Id: <3a81b873.42728670@news.hal-pc.org>

On Wed, 07 Feb 2001 16:10:37 -0000, Chris Stith >
>>Monte wrote--> Elegance in all matters, whether mathematical, musical, visual or
>> anything else is simply this(pun intended<grin>):
>
>> The shortest line between two points!
>
>> HERE:route:OBJECTIVE
>>
>>Monte,
>>

>I suppose posting the same message three times is the shortest
>line to making your point? ;)

I have no idea why or how that got repeated.

>
>And what does shortest line mean in programming? The quickest
>initial implementation? The fastest run time? The fastest
>maintenance turnaround? The most concise code? The fewest actual
>program statements, regardless the length of each? The code that
>becomes the fewest machine-level opcodes? The least use of memory?
>There are many lines that intersect when programming. Which one
>should be the shortest? If it's a combination of all the lengths,
>how do you weight each one?
>
>Chris

Beauty is in the eye of the beholder.  Elegance being linguistically
related to beauty holds a similar definition.   You are quibbling.
Just as in art, when Perl or any other program appears 'elegant' it
is.  If it does not appear so, then it isn't.  Remember, beautiful
ladies come in many different packages.  Why do you think Larry gave
this language a womens name?<grin>

Secondly most of the factors you list are inter-related and so when
one is optimized the others follow.  Optimizing one does not optimize
the others necessarily, but if you program enough years you will know
that the others become weighted automagically as a result of
optimizing the prime factor that tickles your fancy and suits the
projects goals.





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

Date: Wed, 07 Feb 2001 22:59:47 -0000
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: [ANNOUNCE] XML::Records 0.01
Message-Id: <t83kr370vceq3b@corp.supernews.com>

XML::Records, which has been uploaded to CPAN, provides a simple interface for
reading "record-structured" XML documents, that is, documents that consist of
a collection of "record" elements containing "field" elements or attributes. 
Records are returned as Perl hashes.

XML::Records provides similar functionality to Robert Hanson's XML::RAX, but
the interface is more Perlish and it can handle "sub-records" and repeated
fields.  The hashes returned are similar to those returned by Grant McLean's
XML::Simple, but it is not necessary to read the entire document into memory. 
XML::Records also provides an option to return data as ISO-8859-1 (Latin-1)
rather than UTF8.




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

Date: Wed, 07 Feb 2001 21:26:49 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: a bug in perl-5.6.0?
Message-Id: <t83fcptb9o5u9e@corp.supernews.com>

Alexey Morozov <morozov@novosoft.ru> wrote:
> I have reviewed your message once again and would like to ask you additional
> questions if you don't mind :-)

> Chris Stith <mischief@velma.motion.net> wrote:

[snip CS's code]

> Initially I didn't wish to alter the original array. Your code also alters
> @array. This isn't what I originally want to.

Your code below corrects this behavior, doesn't it?

> CS> Turn on warnings.
> Yes, you're completely right.

> CS> This is more broken than the already broken code above.
> CS> The map() function expects its code block to return
> CS> something.
> AFAIK, the value returned is the result of a last operation either it was a
> $_ assigning or just an exit code of a function call. So I thought (before
> faced the error) "place there an expression and it would be enough for
> everything". From this point of view I still don't see difference between
> "null" and undef."null" (except of the perl warning of course).

In perl, an assignment returns whatever was assigned to the left-hand
side (LHS). An expression doesn't return anything. Therefore, having
any LHS, as I did or as you do below, returns something map() can use.

> CS> Altering q<$_> is somewhat equivalent to returning something, 
> ...
> CS> Those are the right results. You don't assign anything to
> CS> q<$_> on that line, so it is still undefined. If you map
> I think you're right when you say that altering $_ also sets the block exit
> (return) code but I thought this is not _required_ to form such code.

True. This is because of the behavior in Perl of an assignment
returning a value (a Perlism, for sure.. not very common in
languages).

> I can illustrate this by next (correct from perl view example)
> -----------------------------------
> use strict;
> use diagnostics;

> my @array = ('a','b',undef,'c','d');

> my @results = map {
>   my $a;
>  SWITCH: 
>   {
>     $a = "null",             last SWITCH unless defined $_;
>     $a = $_.$_,              last SWITCH if ($_ eq 'a');
>     $a = $_.", wow!",        last SWITCH if ($_ eq 'b');
>     $a = $_." default";
>   }
>   $a;
> } @array;

> print "Results: ('".join("', '",@results)."')\n";
> -----------------------------------
> We never alter $_ here, but nevertheless it works. We even can exclude that
> '$a;' string, it still works correctly. (BTW, initially I had a code like
> this but this assigning seemed useless and I left only right parts of the
> expressions)

This does work with or without the '$a;'. It runs with warnings
and strictures on and doesn't complain. It also doesn't change the
original array. You've done a good job of adapting my responses to
your code into something that for your purposes works better than
your original code or my response.

> CS> Warnings are your friend. The diagnostics module can help
> CS> you, too, but warnings should come first in troubleshooting,
> Sure. You're right. Actually I did have #!/usr/bin/perl -w
> in the first line, and saw warnings but considered them non-significant
> here :-(

Warnings are sometimes insignifigant in throw-away code you use a
couple of times, but when debugging, writing production code, or
posting to the newsgroups, they are indispensible.

> I forgot about diagnostics however. Thank you for pointing me on it.

Diagnostics are a lot of help sometimes. I use them when writing or
maintaining code, then disable them for production after I stop
getting warnings and stricture errors. I usually leave warning and
strictures turned on in production though.

Chris

-- 
Christopher E. Stith

Where there's a will, there's a lawyer.



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

Date: 07 Feb 2001 14:35:40 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Again---how to remove item in the array?
Message-Id: <m3elxaqoab.fsf@mumonkan.sunstarsys.com>

nospam_sjamiso_nospam@nospam_my-deja.com (Shawn) writes:

> This example gets rid of the first two elements in the list @getit
> splice(@getit, 0, 2 );
> 
> From perldocs
> 	splice ARRAY,OFFSET,LENGTH,LIST
> 
> This will be more efficient if order doesn't matter.  
> >can i do it with splice and how does this would work.
> 
> Splice is your best choice.  You can select an element and replace it
> directly.  Kind of like an inline replacement.  Just one step.  If
> your array is really that big, this is MUCH FASTER.

NO!  pop and unshift are relatively fast; splice is O(N).
Repetitive usage within a loop is O(N^2) which is _slow_.
I think OP wants/needs an O(N) algorithm.

-- 
Joe Schaefer    "In this life we want nothing but the facts, Sir; nothing but
                                         the facts."
                                                -- Charles Dickens


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

Date: 7 Feb 2001 19:19:03 GMT
From: nospam@hairball.cup.hp.com (Richard J. Rauenzahn)
Subject: Re: Again---how to remove item in the array?
Message-Id: <981573542.683933@hpvablab.cup.hp.com>

nospam_sjamiso_nospam@nospam_my-deja.com (Shawn) writes:
>On Wed, 07 Feb 2001 12:53:44 GMT, Hessu <qvyht@iobox.fi> wrote:
>Try using the splice() function.
>This example gets rid of the first two elements in the list @getit
>splice(@getit, 0, 2 );
>
>From perldocs
>	splice ARRAY,OFFSET,LENGTH,LIST
>
>This will be more efficient if order doesn't matter.  
>>can i do it with splice and how does this would work.
>
>Splice is your best choice.  You can select an element and replace it
>directly.  Kind of like an inline replacement.  Just one step.  If
>your array is really that big, this is MUCH FASTER.

I like Abigail's suggestion best (using shuffle), but as an alternative
to the splicers, how about:

	* Pick a random element from the array.

	* Replace the picked element with the last element of the array.

Is Abigail's shuffle module (or the splice method) 'more random'?
(i.e., am I biasing the random selection in some way?)

Rich


-- 
Rich Rauenzahn ----------+xrrauenza@cup.hp.comx+ Hewlett-Packard Company
Technical Consultant     | I speak for me,     |   19055 Pruneridge Ave. 
Development Alliances Lab|            *not* HP |                MS 46TU2
ESPD / E-Serv. Partner Division +--------------+---- Cupertino, CA 95014


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

Date: Wed, 07 Feb 2001 23:02:20 -0000
From: "Richard Sutherland" <rvsutherland@yahoo.com>
Subject: ANNOUNCE:  DDL::Oracle v1.00
Message-Id: <t83kvslourqe72@corp.supernews.com>

===========================================================================
                   Release of DDL::Oracle, Version 1.00
===========================================================================

CHANGES

Added support for the following Oracle8i features:
    Indexes using the COMPRESSION attribute
    Indexes using column(s) with the DESCending attribute
    Indexes using column(s) based on FUNCTIONS

Adapted defrag.pl to handle tablespaces having no tables (indexes only)

DESCRIPTION

Designed for Oracle DBA's and users, for Oracle versions 7.3, 8.0
and 8i.  Reverse engineers database objects (tables, indexes, users,
profiles, tablespaces, roles, constraints, etc.).  Generates DDL to
*resize* tables and indexes to the provided standard or to a user
defined standard.  Can reorganize/defragment tablespaces.

SYNOPSIS

use DBI;
use DDL::Oracle;

my $dbh = DBI->connect(
                        "dbi:Oracle:dbname",
                        "username",
                        "password",
                        {
                         PrintError => 0,
                         RaiseError => 1
                        }
                      );

# Use default resizing and schema options.
# query default DBA_xxx tables (could use USER_xxx for non-DBA types)
DDL::Oracle->configure( 
                        dbh    => $dbh,
                      );

# Create a list of one or more objects
my $sth = $dbh->prepare(
       "SELECT
               owner
             , name
        FROM
               dba_tables
        WHERE
               tablespace_name = 'MY_TBLSP'    -- your millage may vary
       "
    );
$sth->execute;
my $list = $sth->fetchall_arrayref;

my $obj = DDL::Oracle->new(
                            type  => "table",
                            list  => $list,                          );
                          );

my $ddl = $obj->create;      # or $obj->resize;  or $obj->drop;  etc.

print $ddl;    # Use STDOUT so user can redirect
 to desired file.

AUTHOR

Richard V. Sutherland
rvsutherland@yahoo.com

COPYRIGHT

Copyright (c) 2000, 2001 Richard V. Sutherland.  All rights reserved.
This module is free software.  It may be used, redistributed, and/or
modified under the same terms as Perl itself.  See:

    http://www.perl.com/perl/misc/Artistic.html

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

DDL::Oracle is available from the CPAN, and from:

    http://sourceforge.net/projects/ddl-oracle/







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

Date: Wed, 07 Feb 2001 23:00:29 -0000
From: jari.aalto@poboxes.com (Jari Aalto+mail.perl)
Subject: ANNOUNCE:  mywebget-2001.0105.pl Perl wget(1) batch download
Message-Id: <t83ksdn0d8j54c@corp.supernews.com>
Keywords: file,mywebget,www,http,files,example,com,program,configuration,--verbose,--overwrite,version


    http://www.cpan.org/modules/by-authors/id/J/JA/JARIAALTO/

Manual page and example configuration file on-line at:

    http://tiny-tools.sourceforge.net/ --> mywebget.html

IMPORTANT: This is file is your companion to track frequently 
released files, because it can track "the newest" versions with
heuristics. Something that Wget cannot.


README
    Automate periodic downloads of released files and packages.

  Wget and this program

    At this point you may wonder, where would you need this perl program
    when wget(1) C-program has been the standard for ages. Well, 1) Perl is
    cross platform and more easily extendable 2) You can put file download
    criterias to configuration file and use perl regular epxressions 3) the
    program can anlyze web-pages and "search" for the download link as you
    instruct 4) it contains heuristics to track more newer version of the
    file.

    But it does not replace webget(1) because this program does not offer as
    many options as web get, not even recursive downloads. The best advice
    is to dedicate this program to "batch" download the files that you
    monitor most of the time and use wget(1) for everything else.

  Short introduction

    This small utility makes it possible to keep a list of URLs in a
    configuration file and periodically retrieve those pages or files with
    simple commands. This utility is best suited for small batch jobs to
    download e.g. most recent versions of software files. If you use an URL
    that is already on disk, be sure to supply option --overwrite to allow
    overwriting existing files.

    While you can run this program from command line to retrieve individual
    files, program has been designed to use separate configuration file via
    --config option. In the configuration file you can control the
    downloading with separate directives like `save:' which tells to save
    the file under different name.

    The simplest way to retreive the latest version of a kit from FTP site
    is:

        mywebget.pl --new --overwite --verbose \
           http://www.example.com/kit-1.00.tar.gz

    Don't worry about the filename "kit-1.00.tar.gz". The latest version,
    say, kit-3.08.tar.gz will be retrieved. The option --new instructs to
    find newer version than the provided URL.

    If the URL ends to slash, then directory list at the remote machine is
    stored to file:

        !path!000root-file

    The content of this file can be either index.html or the directory
    listing depending on the used http or ftp protocol.

EXAMPLES
    Get file(s) from site:

        mywebget.pl http://www.example.com/dir/package.tar.gz ..

    Read a directory and store it to filename YYYY-MM-DD::!dir!000root-file.

        mywebget.pl --prefix-date --overwrite --verbose http://www.example.com/dir/

    To update newest version of the kit, but only if there is none in the
    disk already. The --new option instructs to find nwer packages and the
    filename is used only for guidance how the file looks like:

        mywebget.pl --overwrite --skip-version --new --verbose \
            ftp://ftp.example.com/dir/packet-1.23.tar.gz

    To overwrite file and add a date prefix to the file name:

        mywebget.pl --prefix-date --overwrite --verbose \
           http://www.example.com/file.pl

        --> YYYY-MM-DD::file.pl

    To add date and WWW site prefix to the filenames:

        mywebget.pl --prefix-date --prefix-www --overwrite --verbose \
           http://www.example.com/file.pl

        --> YYYY-MM-DD::www.example.com::file.pl

    Get all updated files under KITS and use default configuration file:

        mywebget.pl --verbose --overwrite --skip-version --new --Tag kits
        mywebget.pl -v -o -s -n -T kits

    Get files as they read in the configuration file to the current
    directory, ignoring any `lcd:' and `save:' directives:

        mywebget.pl --config $HOME/config/mywebget.conf /
            --no-lcd --no-save --overwrite --verbose \
            http://www.example.com/file.pl




    




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

Date: Wed, 07 Feb 2001 22:59:13 -0000
From: Dave <david.kernen@bms.com>
Subject: ANNOUNCE: Mail::IMAPClient v2.0.9
Message-Id: <t83kq1o4ddr22c@corp.supernews.com>

Version 2.0.9 of the Mail::IMAPClient module has just hit CPAN and
should soon be on the shelves of a CPAN mirror near you. This version
contains some bug fixes and a new example script but no added function.

In particular, the way the client sends literal data to the server is
now fully RFC2060 compliant. (It previously emulated compliance, but it
did so well enough that almost every server was fooled. Found one that
wasn't, though...)

Mail::IMAPClient is an object oriented perl module that allows perl
scripts to easily connect to and interact with mail message stores
running the IMAP mail access protocol. Wherever possible, output from
the conversation with the server is turned into perl-friendly data
structures (such as arrays of folder names, message numbers, etc.).

For more information, please view the README or the module's pod
documentation. You can find the module on CPAN by surfing to
http://search.cpan.org/search?module=Mail::IMAPClient.

Thank you for your support.

Dave Kernen
The Kernen Group, Inc.







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

Date: Wed, 07 Feb 2001 02:50:28 GMT
From: Chris Winters <cwinters@optiron.com>
Subject: ANNOUNCE: OpenInteract Web Application Server
Message-Id: <t83kohsotrnu0e@corp.supernews.com>

I'm jazzed to announce the public release of OpenInteract,
an
extensible web application framework using mod_perl and the
Template
Toolkit as its core technologies.  But the README already
does all the
heavy lifting:

<<<<<<<<<<

WHAT IS IT?
=========================

OpenInteract is an extensible application server using
Apache and
mod_perl built for developers but also to be manageable
almost
entirely via the web browser. It includes:

 - A robust system of components built on templates that can
access
 your data just about any way that you can think of.

 - A very flexible separation of presentation and data
access: you can
 use one template for accessing data from different sources
(e.g., a
 listing of users from the system, from an LDAP server, from
an NT/SMB
 authentication controller, etc.) or you can use one set of
data to
 fill multiple templates.

 - A consistent security mechanism makes it a snap to
control security
 for users and groups not only at the task level, but also
at the
 individual data object level.

 - A simple user and group-management system that allows
users to
 create their own accounts and an administrator to assign
them to one
 or more groups.

 - A convenient packaging system that makes it simple for
developers
 to distribute code, configuration and all other information
necessary
 for an application. It also makes the installation and
upgrading
 processes very straightforward.

 - An integrated, database-independent method for
distributing data
 necessary for a package. You should be able to install any
 package on any database that's been tested with
OpenInteract. (Some
 of this work must be done by the package authors, but
OpenInteract
 tries to make this as painless as possible.)

>>>>>>>>>>

OpenInteract is available via CPAN in a bundle form
('Bundle::OpenInteract') for EZ install. SourceForge
currently hosts
CVS and mailing lists at:

 http://sourceforge.net/projects/openinteract/

Other information about the project (including press
releases) is
available at:

 http://www.openinteract.org/

OpenInteract is available under the same Artistic/GPL
license as
Perl. Hope you find it as much fun as I do!

Chris

-- 
Chris Winters (chris@cwinters.com)
Building enterprise-capable snack solutions since 1988.




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

Date: Wed, 07 Feb 2001 23:02:09 -0000
From: Rainer Keuchel <rkeuc@allgeier.net>
Subject: ANNOUNCE: Perl for Windows CE
Message-Id: <t83kvhgbar9i70@corp.supernews.com>

This port is based on the native ntperl and was tested on a Jornada
680 with SH3 and a Compaq 2930A with MIPS.

The binary distribution contains only a minimal subset of perl files
and the following executables:

  emacs, perl, ftpd, ls, rsh, rcp, des

Limitations:

* Slow startup.
* No pipes.
* Socket IO does not work with file handles.
* Does not compile/run with optimizations.
* No XS dlls yet.

Sources:

The sources can be made available if there is interest. You
need a Visual C 6.0 installation and a Windows CE SDK to recompile.

The port is mainly based on a crt-library I had to write
to compensate the lack of functions in Microsoft's library
and ANSI wrappers for Unicode functions.

Download: http://www.rainer-keuchel.de
---
Rainer Keuchel (coyxc@rainer-keuchel.de)




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

Date: Wed, 07 Feb 2001 22:58:42 -0000
From: damian@cs.monash.edu.au (Damian Conway)
Subject: ANNOUNCE: Regexp::Common 0.01
Message-Id: <t83kp2834njm17@corp.supernews.com>
Keywords: perl, module, release

==============================================================================
                  Release of version 0.01 of Regexp::Common
==============================================================================


NAME

    Regexp::Common - Provide commonly requested regular expressions


SYNOPSIS

     use Regexp::Common;

     while (<>) {
            /$RE{num}{real}/                
				and print q{a number\n};
            /$RE{quoted}                    
				and print q{a ['"`] quoted string\n};
            /$RE{delimited}{-delim=>'/'}/   
				and print q{a /.../ sequence\n};
            /$RE{balanced}{-parens=>'()'}/  
				and print q{balanced parentheses\n};
            /$RE{profanity}/                
				and print q{a #*@%-ing word\n};
     }


DESCRIPTION

    By default, this module exports a single hash (`%RE') that stores or
    generates commonly needed regular expressions. Patterns currently
    provided include:

	* balanced parentheses and brackets
	* delimited text (with escapes)
	* integers and floating-point numbers in any base (up to 36)
	* comments in C, C++, Perl, and shell
    	* offensive language
	* lists of any pattern
	* IPv4 addresses

    Future releases of the module will also provide patterns for the
    following:

        * email addresses 
        * HTML/XML tags
        * mail headers (including multiline ones),
        * URLS (various genres)
        * telephone numbers of various countries
        * currency (universal 3 letter format, Latin-1, currency names)
        * dates
        * binary formats (e.g. UUencoded, MIMEd)


INSTALLATION

    It's all pure Perl, so just put the .pm file in its appropriate
    local Perl subdirectory.


AUTHOR

    Damian Conway (damian@cs.monash.edu.au)


COPYRIGHT

       Copyright (c) 1997-2000, Damian Conway. All Rights Reserved.
     This module is free software. It may be used, redistributed
     and/or modified under the terms of the Perl Artistic License
          (see http://www.perl.com/perl/misc/Artistic.html)



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

CHANGES IN VERSION 0.01

(No changes have been documented for this version)

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

AVAILABILITY

Regexp::Common has been uploaded to the CPAN
and is also available from:

	http://www.csse.monash.edu.au/~damian/CPAN/Regexp-Common.tar.gz

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




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

Date: Wed, 07 Feb 2001 23:01:36 -0000
From: jmcnamara@cpan.org (John McNamara)
Subject: ANNOUNCE: Spreadsheet::WriteExcel 0.26
Message-Id: <t83kugdf0clg63@corp.supernews.com>

ANNOUNCE
    Spreadsheet::WriteExcel version 0.26 has been uploaded to CPAN. 

NAME
    Spreadsheet::WriteExcel - Write formatted text and numbers to a
    cross-platform Excel binary file.

DESCRIPTION
    This module can be used to write numbers and text in the native
    Excel binary file format. Multiple worksheets can be added to a
    workbook. Formatting can be applied to cells.

    The Excel file produced by this module is compatible with Excel 5,
    95, 97 and 2000.

    The module will work on the majority of Windows, UNIX and
    Macintosh platforms. Generated files are also compatible with the
    Linux/UNIX spreadsheet applications Star Office, Gnumeric and
    XESS. The generated files are not compatible with MS Access.

    This module cannot be used to read an Excel file. See
    Spreadsheet::ParseExcel or look at the main documentation for some
    suggestions.


SYNOPSIS
    To write a string, a number and a formatted string to the first 
    worksheet in an Excel workbook called perl.xls:

    use Spreadsheet::WriteExcel;

    $row1 = $col1 = 0;
    $row2 = 1;
    $row3 = 2;

    my $workbook = Spreadsheet::WriteExcel->new("perl.xls");
    $worksheet   = $workbook->addworksheet();
    $format      = $workbook->addformat();
    
    $format->set_bold();
    $format->set_color('red');
    $format->set_align('center');

    $worksheet->write($row1, $col1, "Hi Excel!");
    $worksheet->write($row2, $col1, 1.2345);
    $worksheet->write($row3, $col1, "Hi Excel!", $format);


INSTALLATION
    Method 1
    ========
    Download the zipped tar file from:
        http://search.cpan.org/search?dist=Spreadsheet-WriteExcel

    Unzip the module as follows or use winzip:
           tar -zxvf Spreadsheet-WriteExcel-0.xx.tar.gz

    The module can be installed using the standard Perl procedure:

        perl Makefile.PL
        make
        make test
        make install    # You may need to be root
        make clean      # or make realclean

    Windows users without a working "make" can get nmake from:
        ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe

    Method 2
    ========
    If you have CPAN.pm configured you can install the module as
    follows:
        perl -MCPAN -e "install 'Spreadsheet-WriteExcel'"

    But, you already knew that.

    Method 3
    ========
    ActivePerl users can use PPM as follows (adjust for wrap):

        C:\> ppm
        PPM> set repository tmp
http://homepage.eircom.net/~jmcnamara/perl
        PPM> install Spreadsheet-WriteExcel
        PPM> quit
        C:\>

        If this fails try the following:

        PPM>install
http://homepage.eircom.net/~jmcnamara/perl/Spreadsheet-WriteExcel.ppd


    NOTE: Version 0.23 changed the WriteExcel namespace. To tidy up 
    stray files it would be best to uninstall any version older than
    this prior to installation. 


AUTHOR
    John McNamara (jmcnamara@cpan.org)

-- 
I know what you are thinking punk. Do I have $#array or $#array+1
elements in my array. - Dirty Larry.




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

Date: Wed, 07 Feb 2001 22:58:59 -0000
From: damian@cs.monash.edu.au (Damian Conway)
Subject: ANNOUNCE: Text::Balanced 1.83
Message-Id: <t83kpjh2d1d11f@corp.supernews.com>
Keywords: perl, module, release

==============================================================================
                  Release of version 1.83 of Text::Balanced
==============================================================================


NAME

    Text::Balanced - Extract delimited text sequences from strings.


SUMMARY (see Balanced.pod for full details)

    Text::Balanced::extract_delimited
    
        `extract_delimited' extracts the initial substring of a string
        which is delimited by a user-specified set of single-character
        delimiters, whilst ignoring any backslash-escaped delimiter
        characters.

    Text::Balanced::extract_bracketed
    
        `extract_bracketed' extracts a balanced-bracket-delimited substring
        (using any one (or more) of the user-specified delimiter brackets:
        '(..)', '{..}', '[..]', or '<..>').
    
    Text::Balanced::extract_quotelike
    
        `extract_quotelike' attempts to recognize and extract any one of the
        various Perl quote and quotelike operators (see "perlop(3)"). Embedded
        backslashed delimiters, nested bracket delimiters (for the
        quotelike operators), and trailing modifiers are all correctly handled.
    
    Text::Balanced::extract_codeblock
    
        `extract_codeblock' attempts to recognize and extract a
        balanced bracket-delimited substring which may also contain
        unbalanced brackets inside Perl quotes or quotelike
        operations. That is, `extract_codeblock' is like a combination
        of `extract_bracketed' and `extract_quotelike'.

    Text::Balanced::extract_tagged
    
        `extract_tagged' attempts to recognize and extract a
        substring between two arbitrary "tag" patterns (a start tag
	and an end tag).

    
INSTALLATION

    It's all pure Perl, so just put the .pm file in its appropriate
    local Perl subdirectory.


AUTHOR

    Damian Conway (damian@cs.monash.edu.au)


COPYRIGHT

       Copyright (c) 1997-2000, Damian Conway. All Rights Reserved.
     This module is free software. It may be used, redistributed
     and/or modified under the terms of the Perl Artistic License
          (see http://www.perl.com/perl/misc/Artistic.html)


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

CHANGES IN VERSION 1.83

	- Many bug fixes for here doc extraction (thanks Tim!)

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

AVAILABILITY

Text::Balanced has been uploaded to the CPAN
and is also available from:

	http://www.csse.monash.edu.au/~damian/CPAN/Text-Balanced.tar.gz

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




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

Date: Wed, 07 Feb 2001 22:59:30 -0000
From: muir@idiom.com (David Muir Sharnoff)
Subject: ANNOUNCE: Text::Wrap 2001.0131
Message-Id: <t83kqi7aqq6831@corp.supernews.com>

There was a bug found in Text::Wrap.  You can get the new
version at:

http://www.cpan.org/authors/id/M/MU/MUIR/modules/Text-Tabs+Wrap-2001.0131.tar.gz

-Dave

CHANGES

    Bugfix by Michael G Schwern <schwern@pobox.com>: don't add extra
    whitespace when working one an array of input (as opposed to a 
    single string).

    Performance rewrite: use m/\G/ rather than s///.

    You can now specify that words that are too long to wrap can simply
    overflow the line.  Feature requested by James Hoagland 
    <hoagland@SiliconDefense.com> and by John Porter <jdporter@min.net>.

    Documentation changes from Rich Bowen <Rich@cre8tivegroup.com>.

README

    Text::Tabs performs the same job that the unix expand(1) and unexpand(1)
    commands do: adding or removing tabs from a document.

    Text::Wrap::wrap() will reformat lines into paragraphs.  All it does is 
    break up long lines, it will not join short lines together.

    Text::Fill::fill() will reformat blocks of text into paragraphs.  It
    uses Text::Wrap::wrap() to do the work

    Install them with:

	    perl Makefile.PL
	    make
	    make test
	    make install

-- 

--
Notice: Your mouse has been moved. Windows will now restart so this 
change can take effect.




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

Date: Wed, 07 Feb 2001 23:02:27 -0000
From: Robert Rothenburg <wlkngowl@unix.asb.com>
Subject: ANNOUNCE: Tie::RegexpHash v0.10
Message-Id: <t83l03cqlmqp76@corp.supernews.com>


NAME
    Tie::RegexpHash - Use regular expressions as hash keys

REQUIREMENTS
    `Tie::RegexpHash' is written for and tested on Perl 5.6.0.

    It uses only standard modules.

SYNOPSIS
      use Tie::RegexpHash;

      my %hash;
      tie %hash, 'Tie::RegexpHash';

      $hash{ qr/^5(\s+|-)?gal(\.|lons?)?/i } = '5-GAL';

      $hash{'5 gal'};     # returns "5-GAL"
      $hash{'5GAL'};      # returns "5-GAL"
      $hash{'5  gallon'}; # also returns "5-GAL"

      my $rehash = Tie::RegexpHash->new();

      $rehash->add( qr/\d+(\.\d+)?/, "contains a number" );
      $rehash->add( qr/s$/,          "ends with an \`s\'" );

      $rehash->match( "foo 123" );  # returns "contains a number"
      $rehash->match( "examples" ); # returns "ends with an `s'"

DESCRIPTION
    This module allows one to use regular expressions for hash keys, so
that
    values can be associated with anything that matches the key.

    Hashes can be operated on using the standard tied hash interface in
    Perl, or using an object-orineted interface described.

    More detailed documentation is described in the module's POD.

AVAILABILITY

  It should show up soon at a CPAN mirror near you in as:

    $CPAN/authors/id/R/RR/RRWO/Tie-RegexpHash-0.10.tar.gz




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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V10 Issue 235
**************************************


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