[23300] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5520 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 18 00:10:44 2003

Date: Wed, 17 Sep 2003 21:10:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 17 Sep 2003     Volume: 10 Number: 5520

Today's topics:
    Re: Problematic delay in script (Tad McClellan)
    Re: Problematic delay in script <ducott@hotmail.com>
    Re: Problematic delay in script (Sam Holden)
    Re: Problematic delay in script <ducott@hotmail.com>
    Re: Problematic delay in script <cs@edu.edu>
    Re: Problematic delay in script <emschwar@pobox.com>
    Re: Problematic delay in script (Sam Holden)
    Re: Problematic delay in script (Tad McClellan)
    Re: Regex to detect patterns that do not start with //  (Mike Grandmasion)
    Re: Splitting up an XML File (Tad McClellan)
    Re: Splitting up an XML File (trwww)
    Re: Spreadsheet::WriteExcel, Excel formula won't calcul (John McNamara)
    Re: tied multi dimensional hashes <bwalton@rochester.rr.com>
    Re: using GUIs <NOSPAM@bigpond.com>
    Re: using GUIs <mail@annuna.com>
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 17 Sep 2003 17:50:54 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Problematic delay in script
Message-Id: <slrnbmhpae.8ot.tadmc@magna.augustmail.com>

\"Dandy\" Randy <ducott@hotmail.com> wrote:
>>    use Mail::Bulkmail;
> 
> I do not believe my hosting company had this module installed.


Then install it yourself.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Wed, 17 Sep 2003 22:59:58 GMT
From: "\"Dandy\" Randy" <ducott@hotmail.com>
Subject: Re: Problematic delay in script
Message-Id: <OH5ab.978768$3C2.22051449@news3.calgary.shaw.ca>

> > I do not believe my hosting company had this module installed.
>
>
> Then install it yourself.

???




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

Date: 17 Sep 2003 23:10:50 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Problematic delay in script
Message-Id: <slrnbmhqfq.m6v.sholden@flexal.cs.usyd.edu.au>

On Wed, 17 Sep 2003 22:59:58 GMT, \"Dandy\" Randy <ducott@hotmail.com> wrote:
>> > I do not believe my hosting company had this module installed.
>>
>>
>> Then install it yourself.
> 
> ???

RTFM

perldoc -q module

-- 
Sam Holden


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

Date: Thu, 18 Sep 2003 00:03:08 GMT
From: "\"Dandy\" Randy" <ducott@hotmail.com>
Subject: Re: Problematic delay in script
Message-Id: <0D6ab.972521$ro6.19208798@news2.calgary.shaw.ca>

"Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message
> RTFM
>
> perldoc -q module

Sam, I don't actually have perl installed locally, so I dont have access to
perldoc information other than what I find on www.perldoc.com ... could you
post instruction? TIA!

R




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

Date: Wed, 17 Sep 2003 17:22:29 -0700
From: Chief Squawtendrawpet <cs@edu.edu>
Subject: Re: Problematic delay in script
Message-Id: <3F68FAC5.DDDF49D4@edu.edu>

\"Dandy\" Randy wrote:
> Sam, I don't actually have perl installed locally, so I dont have access to
> perldoc information other than what I find on www.perldoc.com ... could you
> post instruction? TIA!

You're not trying very hard. If you've got access to the documentation
on the web, go to the FAQ and try searching for the obvious: "install"
(success on the first hit) or "module" (third hit) or "CPAN" (first
hit) ...

Chief S.


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

Date: Wed, 17 Sep 2003 18:26:47 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Problematic delay in script
Message-Id: <etohe3bdjqw.fsf@wormtongue.emschwar>

"\"Dandy\" Randy" <ducott@hotmail.com> writes:
> "Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message
>> RTFM
>>
>> perldoc -q module
>
> Sam, I don't actually have perl installed locally, so I dont have access to
> perldoc information other than what I find on www.perldoc.com ... could you
> post instruction? TIA!

Perl can be installed on every operating system I personally can
conceive of you actually running.  So go out and install it today!
Among the many benefits, you will gain the ability to test your perl
programs before uploading them to your hosting provider (This is so
useful, I can't imagine why anybody would not want to do this), and a
local copy of the latest and greatest Perl documentation that you are
guaranteed matches what is installed.

I'm not going to bother posting the URL on perldoc.com because:

A) Somebody else probably will anyway.
B) You're more than capable, and unlike me, you care.

But it's on there.  Have fun.

-=Eric
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
		-- Blair Houghton.


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

Date: 18 Sep 2003 01:06:56 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Problematic delay in script
Message-Id: <slrnbmi19g.nrl.sholden@flexal.cs.usyd.edu.au>

On Thu, 18 Sep 2003 00:03:08 GMT, \"Dandy\" Randy <ducott@hotmail.com> wrote:
> "Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message
>> RTFM
>>
>> perldoc -q module
> 
> Sam, I don't actually have perl installed locally, so I dont have access to
> perldoc information other than what I find on www.perldoc.com ... could you
> post instruction? TIA!

The Laziness virtue is about reducing overall work, not reducing your own work
by getting others to do trivial things for you.

-- 
Sam Holden



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

Date: Wed, 17 Sep 2003 20:09:13 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Problematic delay in script
Message-Id: <slrnbmi1dp.8uo.tadmc@magna.augustmail.com>

\"Dandy\" Randy <ducott@hotmail.com> wrote:

> I don't actually have perl installed locally,


Why not?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 17 Sep 2003 15:28:41 -0700
From: surfer97301@yahoo.com (Mike Grandmasion)
Subject: Re: Regex to detect patterns that do not start with // or <!--
Message-Id: <75821f06.0309171428.4a0f2e7@posting.google.com>

It is a perl regular expression.  That is what the P option
designates.  If I wrote it in perl I would have the exact same
results.

tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnbmh6n1.82o.tadmc@magna.augustmail.com>...
> Mike Grandmasion <surfer97301@yahoo.com> wrote:
> 
> > if anyone has suggestions on how
> > to improve it.
> 
> 
> Rewrite it in Perl.


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

Date: Wed, 17 Sep 2003 17:49:06 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Splitting up an XML File
Message-Id: <slrnbmhp72.8ot.tadmc@magna.augustmail.com>

Tad McClellan <tadmc@augustmail.com> wrote:

>    $/ = "<economist>\n";


Oops! That should have been:

     $/ = "</economist>\n";


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 17 Sep 2003 20:02:36 -0700
From: toddrw69@excite.com (trwww)
Subject: Re: Splitting up an XML File
Message-Id: <d81ecffa.0309171902.596dfa99@posting.google.com>

jeffg@programmer.net (JAG) wrote in message news:<6b40b6b9.0309171009.20d66b6a@posting.google.com>...
> I have an XML file that looks like this:
> 
<snip />
> 
> But the actual file has about 100 <economist> elements.
> I need to write some Perl code to parse this XML file and 
> write out 100 smaller XML files, each file corresponding to one 
> <economist> element.
> 
> So in my example, I'd write 2 smaller files, one that 
> looks like this:
<snip />
> 
> There are some nested elements in the real file, so I think 
> XML::Simple won't work for this.
> 
> Any ideas about how I can do this?  I don't need to do any processing 
> (at least not now) - just reading and writing smaller chunks.
> 

This uses one of my favorite modules, XML::XPath:

[trwww@waveright trwww]$ perl
use warnings;
use strict;
use XML::XPath;
use IO::File;

my($xp) = XML::XPath->new( xml => join('', <DATA>) );
my($nodeset) = $xp->find(  '/root/economist' );

my($ext) = 0;

foreach my $record ( $nodeset->get_nodelist() ) {
  IO::File->new('> record.'.$ext++)->print($record->toString());
}

__DATA__
<root>
<economist publications="true" >
        <name>
                <first>John</first>
                <last>Doe</last>
        </name>
        <keywords>
                <keyword>Foo</keyword>
                <keyword>Bar</keyword>
        </keywords>
        <title>Indian Chief</title>
</economist>

<economist publications="true" >
        <name>
                <first>Jane</first>
                <last>Smith</last>
        </name>
        <keywords>
                <keyword>More Foo</keyword>
                <keyword>More Bar</keyword>
        </keywords>
        <title>President</title>
</economist>
</root>
Ctrl-D
[trwww@waveright trwww]$ ls -l
total 24
drwxr-xr-x    3 trwww    trwww        4096 Aug 17 19:00 apps
drwx------    3 trwww    trwww        4096 Sep 16 20:49 Desktop
drwxr-xr-x    3 trwww    trwww        4096 Aug 18 16:50 misc
drwxrwxr-x    3 trwww    trwww        4096 Sep  6 19:00 public_html
-rw-rw-r--    1 trwww    trwww         297 Sep 17 22:56 record.0
-rw-rw-r--    1 trwww    trwww         306 Sep 17 22:56 record.1
[trwww@waveright trwww]$ cat record.0
<economist publications="true">
        <name>
                <first>John</first>
                <last>Doe</last>
        </name>
        <keywords>
                <keyword>Foo</keyword>
                <keyword>Bar</keyword>
        </keywords>
        <title>Indian Chief</title>
</economist>[trwww@waveright trwww]$ cat record.1
<economist publications="true">
        <name>
                <first>Jane</first>
                <last>Smith</last>
        </name>
        <keywords>
                <keyword>More Foo</keyword>
                <keyword>More Bar</keyword>
        </keywords>
        <title>President</title>
</economist>[trwww@waveright trwww]$

Todd W.


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

Date: 17 Sep 2003 18:22:43 -0700
From: jmcnamara@cpan.org (John McNamara)
Subject: Re: Spreadsheet::WriteExcel, Excel formula won't calculate
Message-Id: <8cceb2da.0309171722.1f6826b6@posting.google.com>

Sven Jungnickel wrote:
> I'm using the module Spreadsheet::WriteExcel to write an Excel file
> from a Perl script which gets its date from a database.
> ...
> But in columns where I use the function
> SUMIF to calculate a mean value I'm having a problem. The formula is
> written to the corresponding cells, but when I open the Excel file the
> result is not calculated.

Spreadsheet::WriteExcel's formula parser doesn't always parse complex formulas
correctly. Specifically it can incorrectly assign the class of certain reference
tokens used internally by Excel.

This will be fixed at a later stage when I get time to rewrite the formula
parser.

In the meantime, it is possible to post-process the output from the parser to
correct this. Send me a short example program that demonstrates the problem
and I'll let you know how to fix it.

John.
-- 
perl -MCPAN -e 'install jmcnamara & _ x ord $ ;'  | tail -1


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

Date: Thu, 18 Sep 2003 00:58:11 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: tied multi dimensional hashes
Message-Id: <3F69031E.5050803@rochester.rr.com>

Tom wrote:

> Can't it be done or what?
> I need the quickest and easiest way to accomplish this and so far, nothing
> has worked.
> Please share a solution, otherwise I'm stuck with incredibly large, but flat
> records.
 ...
> Tom

That would be to use MLDBM; as has been mentioned in responses to some 
of your previous posts.

-- 
Bob Walton



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

Date: Thu, 18 Sep 2003 08:30:36 +1000
From: "Gregory Toomey" <NOSPAM@bigpond.com>
Subject: Re: using GUIs
Message-Id: <bkanad$r8esf$1@ID-202028.news.uni-berlin.de>

"Joe Creaney" <mail@annuna.com> wrote in message
news:_q2ab.6618$UN4.2011@newsread3.news.pas.earthlink.net...
> I have written some simple GUI.  What I would like to know is how to get
> output in a GUI either text or graphical.
>

I prefer the output of a Graphical User Interface to be text. Why would
anyone want graphics?

gtoomey




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

Date: Thu, 18 Sep 2003 02:12:29 GMT
From: Joe Creaney <mail@annuna.com>
Subject: Re: using GUIs
Message-Id: <hw8ab.7042$UN4.353@newsread3.news.pas.earthlink.net>



Gregory Toomey wrote:

> "Joe Creaney" <mail@annuna.com> wrote in message
> news:_q2ab.6618$UN4.2011@newsread3.news.pas.earthlink.net...
> 
>>I have written some simple GUI.  What I would like to know is how to get
>>output in a GUI either text or graphical.
>>
> 
> 
> I prefer the output of a Graphical User Interface to be text. Why would
> anyone want graphics?
> 
> gtoomey
> 
> 
Great, how can I do it or where can I look to learn how to make 
interactive gui.



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

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 5520
***************************************


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