Problem with Win32::Service in sub

2005-12-06 Thread Denis Peuziat
Hi, I'm a newbie with perl and I don't know much about programming either. I wrote a script to manipulate services on Windows, and it works fine : use Win32::Service; $server_main=ncedpeuziat; $server_backup=nceoatestdp; $current_date = localtime(time); open(LOGFILE, CServer_Sync.log);

Forced interpolation

2005-12-06 Thread Артем Аветисян
Hi, all. use strict; my $str = 'lazha'; my $pattern = 'la(zh)(a)'; my $replacement = '$1op$2'; $str =~ s/$pattern/$replacement/; print $str; __END__ I want zhopa to be printed. So far it is obviously '$1op$2'. eval (as well as s///ee) doesn't seem to be helpful. More generally, I want to

Re: Problem with Win32::Service in sub

2005-12-06 Thread Reinhard Pagitsch
Denis Peuziat wrote: Hi, I'm a newbie with perl and I don't know much about programming either. I wrote a script to manipulate services on Windows, and it works fine : sub Stop_Service { print LOGFILE Stopping $_[0] on $_[1] ...\n; Win32::Service::StopService($_[1], '$_[0]'); That

RE: Forced interpolation

2005-12-06 Thread Charles K. Clarkson
Àðòåì Àâåòèñÿí wrote: : use strict; : my $str = 'lazha'; : my $pattern = 'la(zh)(a)'; : my $replacement = '$1op$2'; : $str =~ s/$pattern/$replacement/; : print $str; : __END__ : : I want : : zhopa my $replacement = $1o\p$2; # or: my $replacement = qq($1op$2); # You can read more about

Re: Forced interpolation

2005-12-06 Thread Chris Wagner
At 06:47 PM 12/6/2005 +0300, my $str = 'lazha'; my $pattern = 'la(zh)(a)'; my $replacement = '$1op$2'; $str =~ s/$pattern/$replacement/; print $str; I want zhopa to be printed. So far it is obviously '$1op$2'. eval (as well I think ur going about this the wrong way. I'm guessing that u want to

Re: Forced interpolation

2005-12-06 Thread Craig Cardimon
I wanted to make a joke about the subject, but every time I try such a thing, it never comes out right. Sigh. -- Craig --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0549-2, 12/06/2005 Tested on: 12/6/2005 12:54:08 PM avast! - copyright (c) 1988-2004 ALWIL Software.

Re[2]: Forced interpolation

2005-12-06 Thread Артем Аветисян
Wow.. I thought about evaling $replacement only, but this way.. It works great. Except it is a brain damage (for me) to understand why it works ;) This trick with \$str in eval is really worth a record in Cookbook. The actual task which caused the issue is that parts of regexp are given be a

Re[2]: Forced interpolation

2005-12-06 Thread Артем Аветисян
English is not my native, so i'd be pleased if you explain me the point :) I wanted to make a joke about the subject, but every time I try such a thing, it never comes out right. Sigh. -- Craig --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0549-2, 12/06/2005

Re: Forced interpolation

2005-12-06 Thread $Bill Luebkert
Артем Аветисян wrote: English is not my native, so i'd be pleased if you explain me the point :) He probably had in mind something of a sexual nature. :) I wanted to make a joke about the subject, but every time I try such a thing, it never comes out right. Sigh.

using Win32::OLE to copy or copy a range from one sheet to another

2005-12-06 Thread Glen Plantz
Title: Message Hi Folks, I've been using Perl for a number of years, and I'm now learning Win32::OLE for manipulating Excel files. I'm try to copyor cut a range of cells from one Worksheet to another. The "Select" portion works fine, but the "Paste" is not working.. Thanks in advance

Re: Forced interpolation

2005-12-06 Thread Chris Wagner
At 01:10 PM 12/6/2005 -0800, $Bill Luebkert wrote: Артем Аветисян wrote: English is not my native, so i'd be pleased if you explain me the point :) He probably had in mind something of a sexual nature. :) I wanted to make a joke about the subject, but every time I try such a

David Wright/sail-technology is out of the office

2005-12-06 Thread David . Wright
I will be out of the office starting 05/12/2005 and will not return until 30/12/2005. Technical Support is available at [EMAIL PROTECTED] ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe:

RE: using Win32::OLE to copy or copy a range from one sheet to another

2005-12-06 Thread Allegakoen, Justin Devanandan
---8--- I've been using Perl for a number of years, ---8--- And you post code with no use strict and warnings? :p Actually what you posted fails to run. So I tidied it up a bit and got this to copy and paste as you desired. Do allow for line wrap. CODE use