Regular expression

2005-09-14 Thread Wong, Danny H.
Hi Perl Gurus, I have a regular expression question. I have a variable $Number = "1.2.3.4" When I use the variable $Number as part of my regular expression, the "." character gets interpret as any character. How do I make it a literal "." that I'm searching for? Example: $String = "This

Re: Print subroutine return value without using brackets.

2005-09-14 Thread Sisyphus
- Original Message - From: "Jan Dubois" > > Try writing it like this: > > package Foo; > use strict; > use warnings; > > use Exporter; > use DynaLoader; > > BEGIN { > @Foo::ISA = qw(Exporter DynaLoader); > @Foo::EXPORT_OK = qw(VALUE); > > $

RE: Print subroutine return value without using brackets.

2005-09-14 Thread Jan Dubois
On Wed, 14 Sep 2005, Sisyphus wrote: > D:\test>dmake test > D:\perl58_M\5.8.7\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl > Undefined subroutine &Foo::foo called at blib\lib/Foo.pm line 8. > BEGIN failed--compilation aborted at blib\lib/Foo.pm line 8. > Compilation failed in require at test.pl

Re: Print subroutine return value without using brackets.

2005-09-14 Thread Sisyphus
- Original Message - From: "Chris Wagner" <[EMAIL PROTECTED]> To: "perl-win32-users" Sent: Thursday, September 15, 2005 12:04 AM Subject: Re: Print subroutine return value without using brackets. > Start it with use subs foo; U need to predeclare a subroutine to use it as > a "builtin

Re: Logon with MAPI

2005-09-14 Thread Chris Wagner
I would deal with it by first issuing a net use \\server\ipc$. Not elegant but it should work. Ja. At 10:40 AM 9/13/05 +0900, [EMAIL PROTECTED] wrote: >Hello, I almost finished a script to delete old msgs >with MAPI, but first "$session->Logon" cause popup for password. >This box says "connectin

Re: Print subroutine return value without using brackets.

2005-09-14 Thread Chris Wagner
Start it with use subs foo; U need to predeclare a subroutine to use it as a "builtin". See perldoc subs. At 07:35 PM 9/14/05 +1000, Sisyphus wrote: >use warnings; >print VALUE(),"\n"; >sub VALUE {return 42} > >but I want to write it as: >print VALUE, "\n"; >not : >print VALUE(), "\n"; > >That i

Re: Win32::AdminMisc::LogonAsUser fail to new domain

2005-09-14 Thread Chris Wagner
I would assume that that means that the domain in question is not accepting logons from the machine u are running this from. If it works with a net use but not AdminMisc then the perl process doesn't have some permission to "change logons" as far as the domain is concerned. I think the LogonAsUse

Re: (no subject)

2005-09-14 Thread $Bill Luebkert
Sisyphus wrote: > I'm a little puzzled, however. In 'perldoc constant' I see: > > -- quote -- > As with all "use" directives, defining a constant happens at compile time. > -- end quote -- > > It seems to me, therefore, that foo() is being called and evaluated at > compile-time. Is that so ? I

RE: Print subroutine return value without using brackets.

2005-09-14 Thread Keith.Watson
> -Original Message- > From: [EMAIL PROTECTED] [mailto:perl- > [EMAIL PROTECTED] On Behalf Of Sisyphus > Sent: Wednesday, September 14, 2005 05:36 > To: perl-win32-users > Subject: Print subroutine return value without using brackets. > > Hi, > Basically, I want to be able to write in a pe

Re: Print subroutine return value without using brackets.

2005-09-14 Thread $Bill Luebkert
Sisyphus wrote: > Hi, > Basically, I want to be able to write in a perl script: > > print VALUE, "\n"; > > and have it print out the value returned by a subroutine. Something like > (which won't compile): > > use warnings > use constant VALUE => foo(); > print VALUE, "\n"; # print 42 > sub foo

Re: (no subject)

2005-09-14 Thread Sisyphus
- Original Message - From: "Sergey Cherniyenko" > > S> use warnings > S> use constant VALUE => foo(); > S> print VALUE, "\n"; # print 42 > S> sub foo {return 42} > > S> But all that produces is (as is to be expected): > S> Undefined subroutine &main::foo called at try.pl line 2. > S> BEGI

(no subject)

2005-09-14 Thread Sergey Cherniyenko
Hello, perl-win32-users, Wednesday, September 14, 2005, 12:35:45 PM, You wrote: S> Hi, S> Basically, I want to be able to write in a perl script: S> print VALUE, "\n"; S> and have it print out the value returned by a subroutine. Something like S> (which won't compile): S> use warnings S> use c

Print subroutine return value without using brackets.

2005-09-14 Thread Sisyphus
Hi, Basically, I want to be able to write in a perl script: print VALUE, "\n"; and have it print out the value returned by a subroutine. Something like (which won't compile): use warnings use constant VALUE => foo(); print VALUE, "\n"; # print 42 sub foo {return 42} But all that produces is (as