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
- 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);
>
> $
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
- 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
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
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
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
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
> -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
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
- 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
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
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
13 matches
Mail list logo