[24580] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6756 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 1 18:07:18 2004

Date: Thu, 1 Jul 2004 15:05:10 -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           Thu, 1 Jul 2004     Volume: 10 Number: 6756

Today's topics:
    Re: HTTP::Request, trailing slash <sebastian.baua@t-online.de>
    Re: limitations of forking on windows (Anno Siegel)
    Re: Looking for a certain regexp <nilram@hotpop.com>
        Matching a part of a string (TonyShirt)
    Re: Newbie: How to I extract word <nilram@hotpop.com>
    Re: PPT UNIX Reconstruction Project at: http://www.perl <Joe.Smith@inwap.com>
    Re: remove carriage returns <trammell+usenet@hypersloth.invalid>
        shouldnt this evaluate in a scalar context??? (dutone)
    Re: shouldnt this evaluate in a scalar context??? <mritty@gmail.com>
    Re: shouldnt this evaluate in a scalar context??? <noreply@gunnar.cc>
    Re: split crazy <gnari@simnet.is>
    Re: split crazy <spamtrap@dot-app.org>
    Re: split crazy <postmaster@castleamber.com>
    Re: split crazy <nospam@nospam.net>
    Re: undefined subroutine that is defined?  mob_perl / p <dburke210@comcast.net>
        which book to learn Perl <danny.dermer@comcast.net>
    Re: which book to learn Perl <mritty@yahoo.com>
    Re: which book to learn Perl (Randal L. Schwartz)
    Re: which book to learn Perl <spamtrap@dot-app.org>
    Re: which book to learn Perl <spamtrap@dot-app.org>
    Re: which book to learn Perl <emschwar@pobox.com>
    Re: which book to learn Perl <nilram@hotpop.com>
        Win32::OLE Excel Chart SeriesCollection. Problem changi moller@notvalid.se
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 01 Jul 2004 20:19:13 +0200
From: Sebastian Bauer <sebastian.baua@t-online.de>
Subject: Re: HTTP::Request, trailing slash
Message-Id: <cc1kil$llu$07$1@news.t-online.com>

Gisle Aas wrote:

> "gnari" <gnari@simnet.is> writes:
> 
>> "Sebastian Bauer" <sebastian.baua@t-online.de> wrote in message
>> news:cbv80l$a8e$01$1@news.t-online.com...
>> > i would accept that they dont allow me to download the image via a
>> > script, but what drives me crazy is that i can obviously get the image
>> > via mozilla but NO other way. I tried telnet 5 mins ago -> didnt work.
>> > So it seems i will need to download the images by myself or i get it
>> > working any other way.
>> > Thx a lot, if you have any ideas please let me know ;-)
>> 
>> sessions, referer, cookies, useragent ...
> 
> They check the 'referer'.  This program works for me:
> 
> #!/usr/bin/perl
> 
> use strict;
> use LWP::UserAgent;
> 
> my $ua = LWP::UserAgent->new(keep_alive => 1);
> my $res = $ua->get("http://www.taz.de/pt/.nf/gif.t,tom.d,1088676000",
>                    referer => "http://www.taz.de/pt/2004/07/01.nf/tomnf");
> print $res->as_string;

Thx a lot, this one worked, i found out the same today but thank you for the
solution :-)
Sebastian


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

Date: 1 Jul 2004 20:14:19 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: limitations of forking on windows
Message-Id: <cc1rar$lpi$1@mamenchi.zrz.TU-Berlin.DE>

Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca> wrote in comp.lang.perl.misc:
> Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote:
> : Tassilo v. Parseval <tassilo.parseval@post.rwth-aachen.de> wrote in
> comp.lang.perl.misc:

> : Another problem is pid re-use.  To be sure that a process with a
> : certain pid is still the same process, it is necessary to check that
> : the system wasn't rebooted in the meantime.  Storing the boot time
> : (if available) along with the pid is a possible solution.
> 
> The usual solution is to put lock files in a directory that gets cleaned
> up at boot time (i.e. deleted).

 ...often /var/run for the sysadmin.  Joe User would need a directory
that gets such service.  /tmp may or may not be one.

Anno


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

Date: 01 Jul 2004 13:49:35 -0500
From: Dale Henderson <nilram@hotpop.com>
Subject: Re: Looking for a certain regexp
Message-Id: <87d63fmukg.fsf@camel.tamu-commerce.edu>

>>>>> "Abigail" == Abigail  <abigail@abigail.nl> writes:

    Abigail> Checksums *can* be checked with a regexp. Regexes for
    Abigail> certain credit cards are on my todo list for
    Abigail> Regexp::Common. Now, if only I could find the URLs with
    Abigail> the checksum formulas....

     I'd be very interested in seeing a regex that checked a checksum.

     I've been playing with this for a while and come up with regex
     based replacement that works:
    
     #!/usr/bin/perl

     use strict;
     use warnings;

     sub luhn{
         # this routine assumes the length of the card number is even.
         # it can be easily modified to odd length numbers.
     
         my $cc=shift;
         $cc=~s/(\d)(\d)/($1?1x$1:0).($2?2x$2:0)/ge;
         $cc=~s/1/11/g;
         $cc=~s/1{10}/1/g;
         $cc=~s/0//g;
         return !(length($cc)%10);
         
         #or
         # return length($cc)=~/0$/;
         #or
         #  $cc=~s/2/1/g;
         #  return $cc=~/^(1{10})+$/;
     }
       
     my $cc;  
     
     foreach $cc qw(1234567890123456 1234567890123452){
         print $cc;
         if(luhn($cc)){
             print " -- Good\n";
         }else{
             print " -- Bad\n";
         }
     }

     camel$ luhn.pl
     
     1234567890123456 -- Bad
     1234567890123452 -- Good

     However, I wonder if could be done more along the lines of 

     if ($cc=~/$re/){
        print " -- Good\n";"
     }
      
     etc.

-- 
Dale Henderson 

"Imaginary universes are so much more beautiful than this stupidly-
constructed 'real' one..."  -- G. H. Hardy


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

Date: 1 Jul 2004 14:38:21 -0700
From: tonyshirt@hotmail.com (TonyShirt)
Subject: Matching a part of a string
Message-Id: <52d54c07.0407011338.1c42a32e@posting.google.com>

I have a string "FILEVERSION 1,01,0,21\n"
I want to match only the numbers "1,01,0,21"

i'm using /([0-9]+,[0-9]+,[0-9]+,[0-9]+)/
but I'm still getting the whole string.  Why?  I know its easier (At
this point) to just split the string by \s, but I just cant give it
up!


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

Date: 01 Jul 2004 14:10:36 -0500
From: Dale Henderson <nilram@hotpop.com>
Subject: Re: Newbie: How to I extract word
Message-Id: <878ye3y24z.fsf@camel.tamu-commerce.edu>

>>>>> "GM" == GM  <geedotmuth@castcom.net> writes:

    GM> Mav wrote:
    >> Hi, there I got string like: $string= "------ Build started:
    >> Project: Myproject, Config: Debug ABC ------"; I would like
    >> print out only anything in between "Project:" to ",", in this
    >> case it is "Myproject" in perl.  Any idea?  Thanks, M

    GM> The following assumes you have no whitespace in your project
    GM> names:

    GM> my $project = $string =~ /Project: (\S+),/;
     
    The following makes no such assumption:
     
     my $project = $string =~ /Project: ([^,]+),/;

     :)

-- 
Dale Henderson 

"Imaginary universes are so much more beautiful than this stupidly-
constructed 'real' one..."  -- G. H. Hardy


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

Date: Thu, 01 Jul 2004 18:16:29 GMT
From: Joe Smith <Joe.Smith@inwap.com>
Subject: Re: PPT UNIX Reconstruction Project at: http://www.perl.com/language/ppt/
Message-Id: <1yYEc.8102$wY5.461@attbi_s54>

Clyde Ingram wrote:

> I was looking for PPT again last week, because one of my colleagues has this
> irritating habit of making "system" calls to OS utilities.  The latest
> example was to "rcp"; and I hoped to show a Perl alternative, for all the
> best-practice reasons.

Best-practice reasons suggest using vendor-supplied binaries in the cases
where you need efficiency or security.  Since 'rcp' is a setUID root binary,
it is not a good candidate for re-implementing in perl.
	-Joe


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

Date: Thu, 1 Jul 2004 21:20:24 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: remove carriage returns
Message-Id: <slrnce900o.8re.trammell+usenet@hypersloth.el-swifto.com.invalid>

On Thu, 01 Jul 2004 17:30:04 GMT, norfernuman wrote:
> I am trying to remove carriage returns ( and more ) from each element
> of an array before using them to create a record for a text file.
> Somehow I sill keep missing one once in a while and a carriage return
> occurs in the middle of an order record.

[snip]

Untested:

  for (@ary) { y/\r\n\t//d }



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

Date: 1 Jul 2004 13:11:16 -0700
From: dutone@hotmail.com (dutone)
Subject: shouldnt this evaluate in a scalar context???
Message-Id: <7d56a4da.0407011211.23a4d024@posting.google.com>

my %h = (roach=>'raid',slut=>'fun');
my @a = qw(roach slut);
print "YEA!!" if @h{@a} == @a

Since @a is a list and evals to 2 in scalar context... 
and @h{@a} returns a list, but this list doesnt go scalar. 
What I was trying to do is see if all the keys in a array
(list,whatever)
exist (not in the 'exists()' scence) in a hash. Of course there are
alot of ways to do this, but i figured this method would work. Any of
you perl thugs have any ideas?


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

Date: Thu, 1 Jul 2004 16:33:34 -0400
From: Paul Lalli <mritty@gmail.com>
Subject: Re: shouldnt this evaluate in a scalar context???
Message-Id: <20040701162543.O16568@barbara.cs.rpi.edu>

On Thu, 1 Jul 2004, dutone wrote:

> my %h = (roach=>'raid',slut=>'fun');
> my @a = qw(roach slut);
> print "YEA!!" if @h{@a} == @a
>
> Since @a is a list and evals to 2 in scalar context...
> and @h{@a} returns a list, but this list doesnt go scalar.

You've made a rather classic incorrect assumption.  You assume that any
list of values in scalar context returns the number of values in that
list.  This is untrue.  An array evaluated in scalar context does return
the size of that array.  A list in scalar context (such as the list
returned by the hash slie @h{@a} returns the last element of that list.


> What I was trying to do is see if all the keys in a array
> (list,whatever)

Not 'whatever'.  They are distinct entities.  You should try to learn the
difference between them.

> exist (not in the 'exists()' scence) in a hash. Of course there are
> alot of ways to do this, but i figured this method would work. Any of
> you perl thugs have any ideas?

The keys function is one that returns a list of hash keys in list context,
and the number of hash keys in scalar context:

print 'Yea!!' if keys %h == @a;

Hope this helps,
Paul Lalli





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

Date: Thu, 01 Jul 2004 22:44:15 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: shouldnt this evaluate in a scalar context???
Message-Id: <2kjbbrF35sm5U1@uni-berlin.de>

dutone wrote:
>
> my %h = (roach=>'raid',slut=>'fun');
> my @a = qw(roach slut);
> print "YEA!!" if @h{@a} == @a
> 
> Since @a is a list and evals to 2 in scalar context...

It does not evaluate to 2 in scalar context since it is a list. It 
does so because it is an array.

> and @h{@a} returns a list, but this list doesnt go scalar.

Yes it does. A list returns the last element in scalar context, and 
that is what happens. Perl would have told you so if you had had 
warnings enabled.

Please use warnings before posting about code that does not output 
what you had expected.

> What I was trying to do is see if all the keys in a array
> (list,whatever)

The distinction is important in this case!

> Any of you perl thugs have any ideas?

     print "YEA!!" if @{ [@h{@a}] } == @a;

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Thu, 1 Jul 2004 18:31:05 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: split crazy
Message-Id: <cc1l5n$f3c$1@news.simnet.is>

"Hya J." <hw84@spudex.emutower.ru> wrote in message
news:40E44F51.297CAA8@spudex.emutower.ru...
> Sam Holden wrote:
 [friendly reference to docs]
> >
> > And there a mere three paragraphs further down is the answer.
>
> This is just assine. Yeah, ok, give a nic reference to the docs, but why
> cut the poor guy off at the last second. Just a way to start a fight or
> a lead to a flame war.
>
> What the hell is so freakin hard to say all he need do is split(/x/, $s,
> -1); Would it take too much of your prcesious time? Well, actually not
> as much time as it to write what you wrote. Interesting logic...

teach a man to fish and so on ....

gnari





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

Date: Thu, 01 Jul 2004 15:55:27 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: split crazy
Message-Id: <WsidncFfyZOs8XndRVn-uA@adelphia.com>

Hya J. wrote:

> This is just assine. Yeah, ok, give a nic reference to the docs, but why
> cut the poor guy off at the last second.

Why teach a man to fish? It's so much harder than just giving him one. You
won't mind giving him another one tomorrow, will you? And the next day, and
the next?

> What the hell is so freakin hard to say all he need do is split(/x/, $s,
> -1); Would it take too much of your prcesious time? Well, actually not
> as much time as it to write what you wrote. Interesting logic...

You assume that Sam wanted to save time, but correctly point out that his
post wouldn't have made sense in that context. So instead of questioning
your base assumption, you conclude that Sam was simply too stupid to
realize that a lengthy post would take more of his time. Interesting logic
indeed.

Yes, it would have been quicker and easier (in the short term) for Sam to
just toss out the correct code - but less useful to Jeff. Instead, Sam took
the time and effort to post a more helpful answer, showing Jeff how he
could have found the relevant docs, and explaining what they say.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Thu, 01 Jul 2004 15:40:59 -0500
From: John Bokma <postmaster@castleamber.com>
Subject: Re: split crazy
Message-Id: <40e476dd$0$190$58c7af7e@news.kabelfoon.nl>

Sherm Pendley wrote:

> Yes, it would have been quicker and easier (in the short term) for Sam to
> just toss out the correct code

"Most people yell on Usenet for a lubricant because they are too lazy to
  learn proper foreplay"

-- 
John                               MexIT: http://johnbokma.com/mexit/
                            personal page:       http://johnbokma.com/
    Experienced Perl programmer available:     http://castleamber.com/
             Happy Customers: http://castleamber.com/testimonials.html


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

Date: Thu, 01 Jul 2004 21:43:07 GMT
From: "Jeff Thies" <nospam@nospam.net>
Subject: Re: split crazy
Message-Id: <Lz%Ec.3973$yy1.2393@newsread2.news.atl.earthlink.net>

<snip>

> > Note, the phrase "By default", usually that indicates you can change the
> > behaviour, so reading further we find:
> >
> >    If LIMIT is unspecified or zero, trailing null fields are
> >    stripped (which potential users of "pop" would do well to remember).
> >    If LIMIT is negative, it is treated as if an arbitrarily large LIMIT
> >    had been specified.
> >
> > And there a mere three paragraphs further down is the answer.
>
> This is just assine. Yeah, ok, give a nic reference to the docs, but why
> cut the poor guy off at the last second. Just a way to start a fight or
> a lead to a flame war.
>
> What the hell is so freakin hard to say all he need do is split(/x/, $s,
> -1); Would it take too much of your prcesious time? Well, actually not
> as much time as it to write what you wrote. Interesting logic...

Oh, I don't mind.

 I had skimmed perldoc before and then googled for an answer.

I must say that I had to print out perldoc -f split and read it repeatedly
before I made sense of it. Counter Intuitive for me!

My third run through I tried this: split(/x/g,$s,-1), which didn't work
until I took out the "g" switch some time later!

Heck, as long as someone who wrote a perl book doesn't flame me, I feel
good!

  Cheers,
Jeff





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

Date: Thu, 1 Jul 2004 17:33:05 -0400
From: "Dan Burke" <dburke210@comcast.net>
Subject: Re: undefined subroutine that is defined?  mob_perl / perl 5.8.4 issue?
Message-Id: <0PGdnW4f_rVzH3ndRVn_iw@comcast.com>


"Richard Gration" <richard@zync.co.uk> wrote in message
news:cbrjea$voq$1@news.freedom2surf.net...
> In article <GZqdnStQiNh0B33d4p2dnA@comcast.com>, "Dan Burke"
> <dburke210@comcast.net> wrote:
>
>
> > "Richard Gration" <richard@zync.co.uk> wrote in message
> <SNIP>
> >> All very well, but the error is telling you that the subroutine
> >> CS_Get_Account_Data isn't defined in package gccDispCustomAcctData at
> >> runtime, which means that it isn't being imported properly regardless
> >> of whether it is exported properly.
> >
> > Well, yes of course that's the problem.  The issue is, and why?>
>
> Very sorry, didn't mean to be patronising. Any luck yet?
>

I tried specifying the package name, and it still didn't work :(
I double checked that the pm file is used in that file, and I checked that
it is in %INC.  But, I tried to call other sub's from that file and it
bombed with the same error.  Most odd.  I hate being so stumped like this.

Dan.





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

Date: Thu, 01 Jul 2004 14:41:09 -0400
From: "danny_isr" <danny.dermer@comcast.net>
Subject: which book to learn Perl
Message-Id: <1a60b8b39ceb60009eaa79d4ef51cc8b@localhost.talkaboutprogramming.com>


Hi i'm new to Perl.
someone gave me the "Learning Perl" book from O`reilly.
but i will have to get my own soon.
i saw that there is another book (with the camel)"Programming Perl" . what
the difference between them ?
which is better for a beginner and beyond.
i saw there the cook book as well ...

or maybe there are other out there ?


Thanks Danny




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

Date: Thu, 1 Jul 2004 14:48:44 -0400
From: Paul Lalli <mritty@yahoo.com>
Subject: Re: which book to learn Perl
Message-Id: <20040701144336.X16568@barbara.cs.rpi.edu>

On Thu, 1 Jul 2004, danny_isr wrote:

> Hi i'm new to Perl.
> someone gave me the "Learning Perl" book from O`reilly.
> but i will have to get my own soon.
> i saw that there is another book (with the camel)"Programming Perl" . what
> the difference between them ?
> which is better for a beginner and beyond.
> i saw there the cook book as well ...
>
> or maybe there are other out there ?


You have a good friend there.

Learning Perl, by Randal Schwartz, is an excellent tutorial.
Programming Perl, by Larray Wall, is *The* Perl book.  It is a reference
book, however, not a tutorial.  You use it when you want to find out how a
certain function or feature works.
The Perl Cookbook is a book of examples.  It's the book you turn to when
you find yourself asking "I wonder how I can do ____ in Perl".

For more info on various Perl books, consult the documentation.  If you
have Perl installed already, run this command:
perldoc -q book

If not, look here:
http://www.perldoc.com/perl5.8.4/pod/perlfaq2.html#Perl-Books


I would say for a beginner, buy the Llama (ie, Learning Perl).  Then to
get down and dirty with Perl, buy the Camel (ie, Programming Perl).   To
go further in the learning stages than the Llama takes you, buy Randal's
continuation, called "Learning Perl Objects, References, and Modules"

Paul Lalli


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

Date: Thu, 01 Jul 2004 18:55:58 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
To: "danny_isr" <danny.dermer@comcast.net>
Subject: Re: which book to learn Perl
Message-Id: <e3a5f72b31b5cbe8fc9cb029ef7def38@news.teranews.com>

>>>>> "danny" == danny isr <danny.dermer@comcast.net> writes:

danny> someone gave me the "Learning Perl" book from O`reilly.
danny> but i will have to get my own soon.

Be sure you get a third edition.  Totally rewritten, totally new
jokes. :)

danny> i saw that there is another book (with the camel)"Programming
danny> Perl" . what the difference between them ?

Programming Perl is the reference book, basically a souped-up version
of the manpages.

danny> which is better for a beginner and beyond.  i saw there the
danny> cook book as well ...

If you are working with larger programs, check out "Learning Perl
Objects References and Modules" (essentially, "Learning Perl volume
2"), continuing in the same style as "Learning Perl" for everything
that we had to leave out of that book.

print "Just another Perl hacker,"; # the original

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Thu, 01 Jul 2004 15:15:00 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: which book to learn Perl
Message-Id: <X_Cdnf2RMfEr_3ndRVn-hQ@adelphia.com>

danny_isr wrote:

> someone gave me the "Learning Perl" book from O`reilly.
> but i will have to get my own soon.
> i saw that there is another book (with the camel)"Programming Perl" . what
> the difference between them ?

The Llama (Learning Perl) is a tutorial, where the Camel is a reference. If
you're an advanced programmer with years of C and/or shell coding behind
you, you might be able to learn the language with just the Camel. If you're
a relatively new programmer, you're probably better off starting with the
Llama.

> i saw there the cook book as well ...

Quite useful once you come to terms with the basics of the language. Lots of
recipes for solving common problems.

> or maybe there are other out there ?

You might find "Mastering Algorithms With Perl" useful. If you've had a
formal education in CS, it's a good overview of applying the algorithms
you've studied to Perl coding. If you haven't, it's a good introduction.

"Advanced Perl Programming" is, well, advanced. You won't need to worry
about it for a while. ;-)

See <http://books.perl.org> for more.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Thu, 01 Jul 2004 16:02:39 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: which book to learn Perl
Message-Id: <JLudncg2FvJ98Hnd4p2dnA@adelphia.com>

Randal L. Schwartz wrote:

> Be sure you get a third edition.  Totally rewritten, totally new
> jokes. :)

You say that in jest, but I think the light tone of the book is part of its
successful formula. Technical books are often far too dry - I can imagine
Ben Stein reading them aloud as his students fall asleep. Yours keeps the
reader awake, slightly amused, and (more importantly) interested.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


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

Date: Thu, 01 Jul 2004 14:47:25 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: which book to learn Perl
Message-Id: <etosmcbh2ua.fsf@fc.hp.com>

Sherm Pendley <spamtrap@dot-app.org> writes:
> Randal L. Schwartz wrote:
>> Be sure you get a third edition.  Totally rewritten, totally new
>> jokes. :)
>
> You say that in jest, but I think the light tone of the book is part of its
> successful formula. Technical books are often far too dry - I can imagine
> Ben Stein reading them aloud as his students fall asleep. Yours keeps the
> reader awake, slightly amused, and (more importantly) interested.

Dry books have their good points-- I've occasionally had non-native
English speakers come to me with a Llama or Camel and not be sure
whether or not a particular passage was a joke or not, and if it was a
joke, why. :)

*I* enjoy the jokes, though.

-=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: 01 Jul 2004 16:18:30 -0500
From: Dale Henderson <nilram@hotpop.com>
Subject: Re: which book to learn Perl
Message-Id: <87u0wrwhnd.fsf@camel.tamu-commerce.edu>

>>>>> "SP" == Sherm Pendley <spamtrap@dot-app.org> writes:

    SP> Randal L. Schwartz wrote:
    >> Be sure you get a third edition.  Totally rewritten, totally
    >> new jokes. :)

    SP> You say that in jest, but I think the light tone of the book
    SP> is part of its successful formula. Technical books are often
    SP> far too dry - I can imagine Ben Stein reading them aloud as
    SP> his students fall asleep. Yours keeps the reader awake,
    SP> slightly amused, and (more importantly) interested.

     I mentioned to a friend who had read camel 1 that I had bought
     camel 2. His response was something along the lines of "Are there
     any new jokes in it?"

-- 
Dale Henderson 

"Imaginary universes are so much more beautiful than this stupidly-
constructed 'real' one..."  -- G. H. Hardy


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

Date: Thu, 01 Jul 2004 18:11:16 GMT
From: moller@notvalid.se
Subject: Win32::OLE Excel Chart SeriesCollection. Problem changing from Excel 2000 to 2002
Message-Id: <uacyj61io.fsf@notvalid.se>

				
Win32::OLE Excel Chart SeriesCollection.		
Problem when changing from Excel 2000 to 2002		
		
		
I have a data sheet with 5 columns of data called $Sheet.		
In Excel 2000 each of the columns ends up in a separate series		
when creating a chart with the 5 columns in the datarange.		
		
When switching from Excel 2000 to Excel 2002 the chart creation		
takes the 5 column range and sets the first 4 columns as the		
first series.		
		
Does anyone have any idea how to work around this or why it's happening?		
Or pointers to relevant documentation somwhere. Or any other		
suggestions		
		
		
		
A small snip of the relevant code for context follows.		
		
# My datarange 		
my $Range = $Sheet->Range('B2:F38');		
		
# Create a new chart		
my $num_of_Sheets = $Book->Worksheets->{Count};		
my $chart         = $Book->Charts->Add({After => $Book->Worksheets($num_of_Sheets)})
  || die Win32::OLE->LastError();
		
# Name the chart		
$chart->{Name} = $Cdays[$dow-1];
		
$chart->SetSourceData({Source => $Range,		
		       PlotBy => xlColumns 
		      });
		
# Put Chart on a page of its own		
$chart->Location({Where => xlLocationAsNewSheet });		
		
$chart->SeriesCollection(1)->{AxisGroup} = xlPrimary;		
$chart->SeriesCollection(1)->{ChartType} = xlColumnStacked;		
$chart->SeriesCollection(1)->Fill->TwoColorGradient(1,1);		
$chart->SeriesCollection(1)->Fill->ForeColor->{SchemeColor} = 10;		
$chart->SeriesCollection(1)->Fill->BackColor->{SchemeColor} = 1;		
		
$chart->SeriesCollection(2)->{AxisGroup} = xlPrimary;		
$chart->SeriesCollection(2)->{ChartType} = xlColumnStacked;		
$chart->SeriesCollection(2)->Fill->TwoColorGradient(1,1);		
$chart->SeriesCollection(2)->Fill->ForeColor->{SchemeColor} = 3;		
$chart->SeriesCollection(2)->Fill->BackColor->{SchemeColor} = 1;		
		
# Crashes on the following line with		
# Can't use an undefined value as a HASH reference at ..... file name and linenr		
$chart->SeriesCollection(3)->{AxisGroup} = xlSecondary;		
$chart->SeriesCollection(3)->{ChartType} = xlLineMarkers;		
$chart->SeriesCollection(3)->{MarkerBackgroundColorIndex} = 7;		
$chart->SeriesCollection(3)->{MarkerForegroundColorIndex} = 7;		
$chart->SeriesCollection(3)->{MarkerStyle} = xlTriangle;		
$chart->SeriesCollection(3)->Border->{Colorindex} = 7;		
$chart->SeriesCollection(3)->Border->{Weight} = xlMedium;		
		
SNIP REST..		


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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


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