[31309] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2554 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Aug 15 14:09:41 2009

Date: Sat, 15 Aug 2009 11:09:07 -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           Sat, 15 Aug 2009     Volume: 11 Number: 2554

Today's topics:
        DBD::Sybase with FreeTDS on 64-bit linux fix <hawk007@flight.us>
        Debug package (isecc)
    Re: end-of-line conventions <jurgenex@hotmail.com>
    Re: FAQ 8.18 How can I do an atexit() or setjmp()/longj <hjp-usenet2@hjp.at>
    Re: FAQ 8.18 How can I do an atexit() or setjmp()/longj <ben@morrow.me.uk>
    Re: Function prototype <jurgenex@hotmail.com>
        growing hashes of arrays <netnews@invalid.com>
    Re: growing hashes of arrays <thepoet_nospam@arcor.de>
        how to use shebang with @ARGV? <mark_galeck_spam_magnet@yahoo.com>
    Re: how to use shebang with @ARGV? <mark_galeck_spam_magnet@yahoo.com>
    Re: how to use shebang with @ARGV? <mark_galeck_spam_magnet@yahoo.com>
    Re: how to use shebang with @ARGV? <ben@morrow.me.uk>
    Re: how to use shebang with @ARGV? <jamesfred@mailinator.com>
    Re: Perl process as a unix background process <m@rtij.nl.invlalid>
        renaming a lot of files? <gcox@freeuk.com>
    Re: renaming a lot of files? <gcox@freeuk.com>
    Re: renaming a lot of files? <gcox@freeuk.com>
    Re: renaming a lot of files? <ben@morrow.me.uk>
    Re: renaming a lot of files? <gcox@freeuk.com>
    Re: revisiting web development in Perl...where to start <bart.lateur@pandora.be>
    Re: Script Hangs on use Win32::OLE::Const <thomas.e.welch@boeing.com>
        Searching for the first komma in a sentence <massion@gmx.de>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 15 Aug 2009 10:26:32 -0700 (PDT)
From: Andrew <hawk007@flight.us>
Subject: DBD::Sybase with FreeTDS on 64-bit linux fix
Message-Id: <319b255f-40f8-416e-8e6f-62dbcce22b5b@26g2000yqk.googlegroups.com>

Just wanted to post a rather trivial fix that took me hours of
fruitless googling and tinkering

This symlink fixed the error below, occurring with "DBD::Sybase" usage
in my script (on a Fedora 9):

              ln -s /usr/local/freetds/lib/libct.so.4 /usr/lib64/

Note: a symlink at /usr/local/lib64 did NOT help for me.

Not sure if this is the best/cleanest way, but it seems to work.  I
would guess that Perl is doing everything correctly, and it is freetds
that doesn't install its shared objects in accordance with (Fedora?)
convention. The gurus here might have more info on this.


perl error:

install_driver(Sybase) failed: Can't load '/usr/local/lib64/perl5/
site_perl/5.10.0/x86_64-linux-thread-multi/auto/DBD/Sybase/Sybase.so'
for module DBD::Sybase: libct.so.4: cannot open shared object file: No
such file or directory at /usr/lib64/perl5/5.10.0/x86_64-linux-thread-
multi/DynaLoader.pm line 203.
 at (eval 7) line 3
Compilation failed in require at (eval 7) line 3.
Perhaps a required shared library or dll isn't installed where
expected
 at [path-to-script] line [whatever]


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

Date: Sat, 15 Aug 2009 13:50:39 +0200
From: pbnew@tin.it (isecc)
Subject: Debug package
Message-Id: <1j4hsmm.tqpassbreu4sN%pbnew@tin.it>

Hi all,

I was wondering if ther's a Devel::Package that could produce, given a
script something of this type:

sub1
  |------ sub2
  |         |----- sub3
  |         
  |-------sub4
  |         |----- sub3
  |         
  |------- sub5

I want only the subs called during a script run.

To solve this problem I tryed to write my own debug package...
but it's new for me.

I wrote this:

package DB;
use strict;
use warnings;
use 5.010;
use DB;
sub sub {
    say "Enterig SUB: ". $DB::sub;
    say "Enterig subname: ". $DB::subname;
}
1;

but I'm not able to get the subs name from:
$DB::sub
$DB::subname
as described from
http://search.cpan.org/~nwclark/perl-5.8.9/lib/DB.pm

Could anyone give me any advice?
Thanks.  


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

Date: Sat, 15 Aug 2009 06:58:16 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: end-of-line conventions
Message-Id: <56fd85156p33v36j0ckmcok0smnu0ko01v@4ax.com>

kj <no.email@please.post> wrote:
>There are three major conventions for the end-of-line marker:

Yes.

>"\n", "\r\n", and "\r".

No. The end-of-line markers are "\010", "\013\010", and "\013".

"\n" is Perl's short-hand notation for whatever end-of-line marker
combination is used on the current platform, thus it can be any of the
three.

>How can I change the script so that the output for unix.txt, dos.txt,
>and mac.txt will be the same as the one shown above for unix.txt?

If you have to deal with cross-platform files then your best bet is to
explicitely check for each combination individually and not to use the
short-hand "\n".

jue


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

Date: Sat, 15 Aug 2009 10:56:38 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: FAQ 8.18 How can I do an atexit() or setjmp()/longjmp()? (Exception handling)
Message-Id: <slrnh8cu27.6qb.hjp-usenet2@hrunkner.hjp.at>

On 2009-08-13 16:02, Ilya Zakharevich <nospam-abuse@ilyaz.org> wrote:
> On 2009-08-12, Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
>> I thought about this for a while and I think that the main difference
>> for me is that I view an exception as a state, but exit as an action.
>
> Exception is an action too:  your throw it.
>
>> Therefore exit isn't an exception, although it might be used to handle
>> an exception.
>>
>> Other, more technical, differences are:
>>
>> An exception causes the stack to unwind until it hits an exception
>> handler.
>
> Not on OS/2.  "A native" exception switches to a different stack, and
> calls a handler with the processor state at time of exception as
> arguments.  The return value of the handler determines what to do
> next.  E.g., POSIX signals may be implemented via these exceptions.

The nice thing about IT is that every word is used to denote at least
two dozens different concepts which are at best loosely related. I think
it is clear that this FAQ entry isn't talking about OS/2 exceptions.


> Programming language exceptions MAY BE impemented via this mechanism,
> although I strongly believe that CRTL implements them by direct stack
> manipulation.

Conceptionally (i.e., as defined by the C standard), longjmp can only be
used to jump to return to a stack frame that is still active. How this
is implemented is a different matter. Some implementations carefully
unwind the stack until they find the matching frame. Some just test
whether the jump is into the right direction. Some don't do any checks
at all.

Similarly, die() in Perl aborts the innermost eval block, i.e.,
conceptionally it searches backwards through the stack until it finds an
eval block. The perl interpreter may implement this in a more efficient
manner, of course. And in Java, an exception aborts the innermost try
block that handles this particular exception. Again, conceptionally,
this searches backwards through the stack but the implementation may
take shortcuts.


These mechanisms are sufficiently similar to mix them together. OS/2
exceptions or POSIX signals are different enough that they should not be
mixed with them, and exit/atexit are a different beast again.

	hp


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

Date: Sat, 15 Aug 2009 11:10:14 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: FAQ 8.18 How can I do an atexit() or setjmp()/longjmp()? (Exception handling)
Message-Id: <65eil6-kan1.ln1@osiris.mauzo.dyndns.org>


Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
> 
> Conceptionally (i.e., as defined by the C standard), longjmp can only be
> used to jump to return to a stack frame that is still active. How this
> is implemented is a different matter. Some implementations carefully
> unwind the stack until they find the matching frame. Some just test
> whether the jump is into the right direction. Some don't do any checks
> at all.
> 
> Similarly, die() in Perl aborts the innermost eval block, i.e.,
> conceptionally it searches backwards through the stack until it finds an
> eval block. The perl interpreter may implement this in a more efficient
> manner, of course.

Errm... the perl interpreter calls longjmp :). 

(There was an option at some point to allow e.g. C++ exceptions to be
used instead, but it never worked properly and has now been stripped
out. See the comments in cop.h if you're interested.)

> These mechanisms are sufficiently similar to mix them together. OS/2
> exceptions or POSIX signals are different enough that they should not be
> mixed with them, and exit/atexit are a different beast again.

Ilya has a point, though, that all are generally 'ways of handling a
potentially-disasterous situation'. A Java programmer who goes looking
for 'exception handling' thinking to write a 'finally' block may well
find that END is sufficient for their needs.

Ben



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

Date: Sat, 15 Aug 2009 09:10:36 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Function prototype
Message-Id: <ppmd85l61j8e8dfrsksrnv11v0m70kfvh9@4ax.com>

pavunkumar <pavun.bks@gmail.com> wrote:
>        I want to write a function , that should accept specific
>number of arguments .
>example :
>
>I have a function called "add"  , I wrote definition for that adding
>two numbers,which I am going to pass as a argument.  In this case if I
>pass more than two argument, compile has to say error. Actually it is
>not saying . So How can I achieve this one.

Your requirement is uncommon in Perl. Usually people would write
functions to deal with an arbitrary number of arguments (in your example
of add just add them all) or include code in the function to check for
the correct number of arguments at runtime:
	die "Wrong number of arguments in add" unless @_ == 2;

 However, if you really really want to you can read up on prototypes in
"perldoc perlsub", section "Prototypes".

jue


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

Date: Sat, 15 Aug 2009 06:52:33 -0700
From: HASM <netnews@invalid.com>
Subject: growing hashes of arrays
Message-Id: <m3d46xrxpa.fsf@127.0.0.1>


Is there a more compact way of writing the statements below?

  if (defined $hash{$key}) {
    push (@{$hash{$key}}, $value);
  } else {
    $hash{$key} = [$value];
  }

-- HASM


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

Date: Sat, 15 Aug 2009 16:34:47 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: growing hashes of arrays
Message-Id: <4a86c778$0$30222$9b4e6d93@newsspool1.arcor-online.net>

HASM wrote:
> Is there a more compact way of writing the statements below?
> 
>   if (defined $hash{$key}) {
>     push (@{$hash{$key}}, $value);
>   } else {
>     $hash{$key} = [$value];
>   }

push @{$hash{$key}}, $value;

Perl does autovivification, that is if it encounters the mention
of a hash entry outside of a call to "exists", it automatically
creates it with the type deduced from the context it is used in.
http://en.wikipedia.org/wiki/Autovivification

-Chris


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

Date: Fri, 14 Aug 2009 22:27:05 -0700 (PDT)
From: Mark_Galeck <mark_galeck_spam_magnet@yahoo.com>
Subject: how to use shebang with @ARGV?
Message-Id: <4229bb1d-4ba0-4971-bcb3-88b4f51af5ff@y4g2000prf.googlegroups.com>

Look at foobar.pl: (on WinXP and Strawberry Perl)

#!perl
print $#ARGV + 1  . " command-line arguments.\n";


D:\Perl>perl foobar.pl 1 1
2 command-line arguments.

D:\Perl>foobar.pl 1 1
0 command-line arguments.



Why is this so?  How can I use @ARGV and shebang?

Thank you for your insights!  Mark






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

Date: Fri, 14 Aug 2009 23:03:34 -0700 (PDT)
From: Mark_Galeck <mark_galeck_spam_magnet@yahoo.com>
Subject: Re: how to use shebang with @ARGV?
Message-Id: <9e286a21-d69c-4be8-8075-adb44e7181e2@j9g2000prh.googlegroups.com>

>What makes you think that Windows cares about shebang?--Andrew DeFaria

That #!perl works at all.



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

Date: Fri, 14 Aug 2009 23:29:27 -0700 (PDT)
From: Mark_Galeck <mark_galeck_spam_magnet@yahoo.com>
Subject: Re: how to use shebang with @ARGV?
Message-Id: <0342d2f6-a8ee-49b9-87ed-213ebe690a40@i8g2000pro.googlegroups.com>

Thank you Andrew.



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

Date: Sat, 15 Aug 2009 07:47:13 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: how to use shebang with @ARGV?
Message-Id: <h82il6-o5m1.ln1@osiris.mauzo.dyndns.org>


Quoth Mark_Galeck <mark_galeck_spam_magnet@yahoo.com>:
> Look at foobar.pl: (on WinXP and Strawberry Perl)
> 
> #!perl
> print $#ARGV + 1  . " command-line arguments.\n";
> 
> D:\Perl>perl foobar.pl 1 1
> 2 command-line arguments.
> 
> D:\Perl>foobar.pl 1 1
> 0 command-line arguments.
> 
> Why is this so?  How can I use @ARGV and shebang?

Whatever file-association magic you've set up for .PL isn't correctly
passing the arguments along. IIRC 'ftype /?' has a complete example of
how to set up Perl correctly :).

Ben



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

Date: Sat, 15 Aug 2009 00:14:58 -0700 (PDT)
From: fred <jamesfred@mailinator.com>
Subject: Re: how to use shebang with @ARGV?
Message-Id: <8ceaad60-beed-4776-8ba0-7c13f601ff51@b15g2000yqd.googlegroups.com>

On Aug 15, 6:27=A0am, Mark_Galeck <mark_galeck_spam_mag...@yahoo.com>
wrote:
> Look at foobar.pl: (on WinXP and Strawberry Perl)
>
> #!perl
> print $#ARGV + 1 =A0. " command-line arguments.\n";
>
> D:\Perl>perl foobar.pl 1 1
> 2 command-line arguments.
>
> D:\Perl>foobar.pl 1 1
> 0 command-line arguments.
>
> Why is this so? =A0How can I use @ARGV and shebang?
>
> Thank you for your insights! =A0Mark


The #! line is not used by Windows to find the interpreter.
On Windows you need to associate the ".pl" file extension
with your perl.exe which your 2nd example shows you've done.

The problem you have shown is that the command line arguments
are not being passed to the interpreter.

Fire up regedit, and find the key:

HKEY_CLASSES_ROOT\Applications\perl5.10.0.exe\shell\open\command

(yours might be for perl.exe or perl5.8.7.exe etc.)

It needs to be of the form:

"C:\strawberry\perl\bin\perl5.10.0.exe" "%1" %*

(obviously you'll need to use the path to your perl.exe :-)

It's the "%*" that represents the comand line arguments that
get passed to the interpreter.

Additionally, you may want to add ".pl" to your PATHEXT environment
variable so that you can then run "foobar" rather than "foobar.pl";
and by adding the directory containnig foobar.pl to your PATH you
will be able to run it as "foobar" from any directory.

HTH.




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

Date: Sat, 15 Aug 2009 16:41:04 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl process as a unix background process
Message-Id: <01uil6-7pb.ln1@news.rtij.nl>

On Tue, 11 Aug 2009 07:37:08 -0700, gbostock wrote:

> On Aug 10, 1:42 pm, Martijn Lievaart <m...@rtij.nl.invlalid> wrote:
>> On Mon, 10 Aug 2009 08:28:22 -0700, gbostock wrote:
>> > Thanks, your post led me to the solution to the problem and I didn't
>> > have to guess at lines of code.
>>
>> Care to share what was wrong? I'm interested now.
>>
>> M4
> 
> When a command is issued from the perl program, you need to put an & at
> the end of that command too. Backticks, qx and system all do a clone and
> through dup wind up using the same I/O handles as where the parent
> process came from. This puts a new command coming from the parent
> process at the terminal, creating the situation as described by Peter J.
> Holzer.

Strange, because nohup should have redirected those handles. Besides, 
when I issue another command from my perl code, whether to run it async 
or not is an important property of my algorith. If I were to just put an 
& at the back of the command line, my program will not do what it is 
designed to do.

In fact, I often do that (execute other programs from a background 
program) and it works as expected. So I still don't get it.

M4


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

Date: Sat, 15 Aug 2009 05:09:20 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: renaming a lot of files?
Message-Id: <accc8514959os8une7ivnhedq4t88t1luq@4ax.com>

Hello,

I would like to rename some files and keep track of the name changes.

I have 12 sets of 10 made up of a swf (flash) and a jpg file and 4
images, such as

video_c1_1.swf
video_c1_1.jpg
image_c1_11.jpg
image_c1_12.jpg
image_c1_13.jpg
image_c1_14.jpg

and

video_c1_2.swf
video_c1_2.jpg
image_c1_21.jpg
image_c1_22.jpg
image_c1_23.jpg
image_c1_24.jpg

etc

At the moment they are numbered 1 to 120 and

1-10 are for one age group
11-20 an other age group
21-30 an other age group
etc

Within each age group I need to change the file names so that the
order in which the user sees them is different from the present
collection but I need to know say that 

video_c1_2.swf
video_c1_2.jpg
image_c1_21.jpg
image_c1_22.jpg
image_c1_23.jpg
image_c1_24.jpg

has become

video_c1_5.swf
video_c1_5.jpg
image_c1_5.jpg
image_c1_5.jpg
image_c1_5.jpg
image_c1_5.jpg

I need to have 4 different collections, the present one and three
others.

Within each age the numbers in the file names could be randomized but
I still need to know what becomes what.

Any pointers please?!

Thanks

Geoff







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

Date: Sat, 15 Aug 2009 05:13:13 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: Re: renaming a lot of files?
Message-Id: <ucdc8590rl11srhvqa343f100qqgr0fpbm@4ax.com>

On Sat, 15 Aug 2009 05:09:20 +0100, Geoff Cox <gcox@freeuk.com> wrote:

>Hello,
>
>I would like to rename some files and keep track of the name changes.
>
>I have 12 sets of 10 made up of a swf (flash) and a jpg file and 4
>images, such as
>
>video_c1_1.swf
>video_c1_1.jpg
>image_c1_11.jpg
>image_c1_12.jpg
>image_c1_13.jpg
>image_c1_14.jpg
>
>and
>
>video_c1_2.swf
>video_c1_2.jpg
>image_c1_21.jpg
>image_c1_22.jpg
>image_c1_23.jpg
>image_c1_24.jpg
>
>etc
>
>At the moment they are numbered 1 to 120 and
>
>1-10 are for one age group
>11-20 an other age group
>21-30 an other age group
>etc
>
>Within each age group I need to change the file names so that the
>order in which the user sees them is different from the present
>collection but I need to know say that 
>
>video_c1_2.swf
>video_c1_2.jpg
>image_c1_21.jpg
>image_c1_22.jpg
>image_c1_23.jpg
>image_c1_24.jpg
>
>has become
>
>video_c1_5.swf
>video_c1_5.jpg
>image_c1_5.jpg
>image_c1_5.jpg
>image_c1_5.jpg
>image_c1_5.jpg

sorry - the above should have read

video_c1_2.swf
video_c1_2.jpg
image_c1_21.jpg
image_c1_22.jpg
image_c1_23.jpg
image_c1_24.jpg

has become

video_c1_5.swf
video_c1_5.jpg
image_c1_51.jpg
image_c1_52.jpg
image_c1_53.jpg
image_c1_54jpg

Geoff





>
>I need to have 4 different collections, the present one and three
>others.
>
>Within each age the numbers in the file names could be randomized but
>I still need to know what becomes what.
>
>Any pointers please?!
>
>Thanks
>
>Geoff
>
>
>
>


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

Date: Sat, 15 Aug 2009 05:59:32 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: Re: renaming a lot of files?
Message-Id: <iufc855nne8nfnjpiv8191n0boev1crcda@4ax.com>

On Sat, 15 Aug 2009 05:13:13 +0100, Geoff Cox <gcox@freeuk.com> wrote:


>>Within each age the numbers in the file names could be randomized but
>>I still need to know what becomes what.

the above is not clear - what I mean is that however the renaming is
done each set of 10 files must still contain all the original 10 files
- just that their names are different so that in working through the
files in numeric order they will be presented in a different order
from the original set..

Geoff


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

Date: Sat, 15 Aug 2009 05:57:44 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: renaming a lot of files?
Message-Id: <8rrhl6-5ol1.ln1@osiris.mauzo.dyndns.org>


Quoth Geoff Cox <gcox@freeuk.com>:
> 
> I would like to rename some files and keep track of the name changes.
<snip>
> 
> Any pointers please?!

perldoc -f rename
perldoc -f glob

If that isn't what you want you will need to be more specific about how
the files need to be renamed.

Ben



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

Date: Sat, 15 Aug 2009 08:43:44 +0100
From: Geoff Cox <gcox@freeuk.com>
Subject: Re: renaming a lot of files?
Message-Id: <3npc85pjesi77l6sbvvfprlsk22oij6g03@4ax.com>

On Sat, 15 Aug 2009 05:57:44 +0100, Ben Morrow <ben@morrow.me.uk>
wrote:

>
>Quoth Geoff Cox <gcox@freeuk.com>:
>> 
>> I would like to rename some files and keep track of the name changes.
><snip>
>> 
>> Any pointers please?!
>
>perldoc -f rename
>perldoc -f glob

Thanks Ben - I think I have found a way to avoid the renaming with a
small change to my current code so all may be well!

Cheers

Geoff


>
>If that isn't what you want you will need to be more specific about how
>the files need to be renamed.
>
>Ben


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

Date: Sat, 15 Aug 2009 16:08:20 +0200
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: revisiting web development in Perl...where to start?
Message-Id: <3agd85tac7an7odm7jebd03dnv7litmn9u@4ax.com>

Xho Jingleheimerschmidt wrote:

>> What is the modern
>> way to do dynamic web pages in Perl?
>
>The modern way is probably to write Perl which generates JavaScript
>which generates Flash which redirects through 18 layers of web services,
>AOP, SLAs, IoC, XML, SOBs, and web 2.0.0.0.0.0, finally producing a pale 
>blue square with a blinking orange message that says "unknown error, 
>please try again".  Modernity isn't all its cracked up to be.

Thanks for the chuckle...

-- 
	Bart.


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

Date: Sat, 15 Aug 2009 08:47:36 -0700 (PDT)
From: TomW <thomas.e.welch@boeing.com>
Subject: Re: Script Hangs on use Win32::OLE::Const
Message-Id: <ca3416a1-27a7-498f-aafa-ff34c1c948f9@h31g2000yqd.googlegroups.com>

On Aug 14, 5:54=A0pm, "Thrill5" <nos...@somewhere.com> wrote:
> "TomW" <thomas.e.we...@boeing.com> wrote in message
>
> news:938e70a3-5ba3-41b7-ba61-f959ac9b1d86@w6g2000yqw.googlegroups.com...
>
>
>
> > I've been using win32::ole for some time to automate PowerPoint
> > (Office 2003) on a server. =A0I know it's not recommended but I'm stuck
> > with it. =A0It's been working well for several years but sometime over
> > the last few days it stopped working. =A0I've tracked down the possible
> > problem to this statement:
>
> > use Win32::OLE::Const 'Microsoft Office 11.0 Object Library';
>
> > For some unknown reason the above statement now causes the script to
> > hang. =A0It will eventually time out. =A0I'm at a total loss as to why
> > this is happening. =A0The version of office has not changed. =A0I even
> > reinstalled Perl from a clean image and it still hangs. =A0Has anyone
> > ever encountered anything like this ? =A0I have checked the event viewe=
r
> > and there is no record of any error. =A0Could it be the module is now
> > unable to communicate with PowerPoint and that causes the hang up ?
> > I'm stumped. =A0Thanks in advance for any help.
>
> Have you installed any OS or Office patches on the server lately? =A0The =
Win32
> modules are wrappers to call Windows DLL subroutines and a patch could ha=
ve
> disabled some functionality or broken something.

I've asked the server team that same question.  I know approximately
when it stopped working but have not yet heard back from them.  In the
meantime I've done some testing and found that given enough time the
script will eventually run.  I have a test script that normally takes
about 10 seconds to build a simple x-y area graph in PowerPoint.
Once "use Win32::OLE::Const" is called the script hangs for anywhere
from 10 to 15 minutes and then completes normally.  Does that give you
any ideas ?  I thought the anti-virus was causing the delay but I
cannot find any record in the av log that would confirm that idea.
I'll proceed with checking on the office and os patches.  Thanks.


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

Date: Sat, 15 Aug 2009 11:07:50 -0700 (PDT)
From: Francois Massion <massion@gmx.de>
Subject: Searching for the first komma in a sentence
Message-Id: <68646901-e655-4f16-abc0-ae73c495ae4e@k19g2000yqn.googlegroups.com>


I am trying to modify the pattern of a sentence with a komma
separating different sections of the sentence. I would like to put at
the end of the sentence what is at the beginning of the sentence.

Current pattern: word1 word2 word3, word4, word5 word6
Expected pattern: word4, word5 word6, word1 word2 word3

Replacement expression:

$sentence =~ s/(.*)(,)(.*)/$3$2$1/;

Actual result:  word5 word6,word1 word2 word3, word4

Apparently Perl doesn't start at the beginning of the sentence but
searches backwards. This would be the reason for this result. As some
sentences have only one komma, others more than 2, I would like to
tell Perl to start searching for the first komma in the sentence. How
can I do it?


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

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 V11 Issue 2554
***************************************


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