Re: RegExp help

2005-10-28 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > > how about we find your start and work forward? Brian did the end and work > backward, but i always like trying to find an alternative way to look at > things. i found it's normally easier for me. > > if we know it will always have one or more / in front, but start e

Re: Need help with regex

2005-10-28 Thread Petr Vileta
sekhar kavuru wrote: Hi All I need a REGEX to get a string between two characters from a static string e.g. /install/sql/foo.c@@/main/integration/1 I need to get foo.c , i.e string between / and @@ my $string = '/install/sql/foo.c@@/main/integration/1'; $string =~ s#^.+?(.*?/([^/]+?))[EMAI

re: RegExp help

2005-10-28 Thread JPerlmutter
I did read them all. I think Brian Raven's subroutine you can place in a package is one of the better ideas, but something I like to do i did not see done, So i would like to chime in, in the hopes that I can help in teaching some regexp here. -quoted-- From: sekhar kavuru <[EMA

Email with Outlook and Exchange...

2005-10-28 Thread Lincoln, Adym
Hi all, Anyone know the best way to read/process email from and Outlook/Exchange server using Perl. I thought it was with Win32::MAPI, but I can't seem to locate the module(s). A search on google shows lots of links, but they all come up 404'd (Not Found). I see another module called Win32::Out

Re: Need help with regex

2005-10-28 Thread Sam Dela Cruz
Sekhar, try this my $string =  '/install/sql/foo.c@@/main/integration/1'; $string =~ s/^.*\/(.*)[EMAIL PROTECTED]@.*/$1/; print $string,"\n"; I took advantage of .* being greedy. Regards, Sam Dela Cruz

RE: Need help with regex

2005-10-28 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sekhar kavuru Sent: 28 October 2005 16:51 To: activeperl@listserv.ActiveState.com Subject: Need help with regex > Hi All > > > I need a REGEX to get a string between two characters from a static string > > > e.g. /install/sql/f

Re: Need help with regex

2005-10-28 Thread Chris . McEwen
Hi, See comments below. Chris McEwen Sr. Configuration Management Analyst Alcatel Canada Inc. Office: 416.748.4424 ext 5015 mailto: [EMAIL PROTECTED] sekhar kavuru <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 10/28/2005 11:51 AM To activeperl@listserv.ActiveState.com cc Subject

RE: Need help with regex

2005-10-28 Thread Bullock, Howard A.
use strict; my $text = '/install/sql/foo.c@@/main/integration/1'; my ($value) = $text =~ /\/([^\/]+?)@/; e.g. /install/sql/foo.c@@/main/integration/1 ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.Active

Need help with regex

2005-10-28 Thread sekhar kavuru
Hi All   I need a REGEX to get a string between two characters from a static string   e.g. /install/sql/foo.c@@/main/integration/1   I need to get foo.c , i.e string between / and  @@    First it needs find where @@ occurs in the string and trace back to file name until it encounters / character

RE: Passing references to DB handles between main and subs

2005-10-28 Thread Mark Knoop
Charles K. Clarkson wrote: > : use DBI; > : use DBD::ODBC; # can this live solely in the module? > > You don't need this at all. DBI calls the appropriate driver > from the connection string. Oh. I wonder where I got that from. > > > : use Common::CSAdmin; # this is my module > : > : my $dbh

RE: Passing references to DB handles between main and subs

2005-10-28 Thread Mark Knoop
$Bill wrote: > > Try : > > our @ISA = qw(Exporter); > our @EXPORT = qw(mysub); > That's fixed that one - title of this thread shuold be changed to 'Exporting functions from Perl modules'. Anyhow it seems as though the passing back of $dbh works fine so am well on my way to tidying up a huge amount