Re: Pattern matching

2006-03-04 Thread Chris Wagner
Ok I figured it out. The eval has to output a legal argument for print(). The previous version didn't work because print $x $y is invalid. U need print "$x $y". $x = "a"; $y = "b"; $z = '$x $y'; print eval "\"$z\""; ## a b -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911

Re: Pattern matching

2006-03-04 Thread $Bill Luebkert
Jim Hill wrote: > $Bill Luebkert wrote: > >>The eval already suggested by Chris should work > > It doesn't, unfortunately, unless I'm mishandling it in some way. Try this one: use strict; use warnings; my %ini; my $inifile = 'test.ini'; make_ini ($inifile); read_ini ($inifile); print Data::

Re: Pattern matching

2006-03-04 Thread Chris Wagner
At 01:07 PM 3/2/2006 +, Jim Hill wrote: >> I would try print eval $ini{section}{match}. > >Sorry, I should have mentioned that I've tried that ... Desperation time. ;) $x = "a"; $y = "b"; $z = '$x $y'; ($m1, $m2) = $z =~ m/\$(.+)\s\$(.+)/; print "$$m1 $$m2"; ## a b -- REMEMBER TH

Re: Pattern matching

2006-03-03 Thread Jim Hill
Thomas, Mark - BLS CTR in <[EMAIL PROTECTED]>: > > > > > Jim Hill wrote: > > > > > > > > > > > | $ini{section}{match} = '$1 $2'; > > > > > > ... however that just prints "$1 $2" as a literal string. > > > > > > > > > > Hint: the above two lines of your post answer your own question. > > > > > >

RE: Pattern matching

2006-03-03 Thread Thomas, Mark - BLS CTR
> Thomas, Mark in > <[EMAIL PROTECTED]>: > > > From: Jim Hill [mailto:[EMAIL PROTECTED] > > > Thomas, Mark in > <[EMAIL PROTECTED]>: > > > > Jim Hill wrote: > > > > > > > > > | $ini{section}{match} = '$1 $2'; > > > > > ... however that just prints "$1 $2" as a literal string. > > > > > > > > Hi

RE: Pattern matching

2006-03-03 Thread Thomas, Mark - BLS CTR
Jim Hill wrote: > | $ini{section}{match} = '$1 $2'; > ... however that just prints "$1 $2" as a literal string. Hint: the above two lines of your post answer your own question. :-) - Mark. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.A

Re: Pattern matching

2006-03-03 Thread Jim Hill
Thomas, Mark in <[EMAIL PROTECTED]>: > Jim Hill wrote: > > > | $ini{section}{match} = '$1 $2'; > > ... however that just prints "$1 $2" as a literal string. > > Hint: the above two lines of your post answer your own question. Do they? That doesn't help me, I'm afraid. I've been struggling with t

Re: Pattern matching

2006-03-03 Thread Jim Hill
Thomas, Mark - BLS CTR in <[EMAIL PROTECTED]>: > Glad you got it... I didn't realize you *wanted* the '$1 $2' to be > *stored* as a literal string. There's the rub, neither did I. -- ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveS

Re: Pattern matching

2006-03-03 Thread Jim Hill
$Bill Luebkert wrote: > Jim Hill in <[EMAIL PROTECTED]>: > > > I have a log analysis script to which I'm trying to add a pattern > > matching option. [snip] > > The eval already suggested by Chris should work It doesn't, unfortunately, unless I'm mishandling it in some way. > and if you need t

Re: Pattern matching

2006-03-03 Thread Jim Hill
Thomas, Mark in <[EMAIL PROTECTED]>: > > From: Jim Hill [mailto:[EMAIL PROTECTED] > > Thomas, Mark in <[EMAIL PROTECTED]>: > > > Jim Hill wrote: > > > > > > > | $ini{section}{match} = '$1 $2'; > > > > ... however that just prints "$1 $2" as a literal string. > > > > > > Hint: the above two lines

Re: Pattern matching

2006-03-03 Thread Jim Hill
Chris Wagner in <[EMAIL PROTECTED]>: > At 12:07 AM 3/2/2006 +, perl-win32-users@listserv.ActiveState.com wrote: > > | print $ini{section}{match}; > > > >... however that just prints "$1 $2" as a literal string. > > I would try print eval $ini{section}{match}. Sorry, I should have mentioned t

Re: Pattern matching

2006-03-01 Thread Chris Wagner
At 12:07 AM 3/2/2006 +, perl-win32-users@listserv.ActiveState.com wrote: >| print $ini{section}{match}; > >... however that just prints "$1 $2" as a literal string. I would try print eval $ini{section}{match}. -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis

Re: Pattern matching problem

2005-11-04 Thread Reinhard Pagitsch
Hello, Use the module File::Basename. regards, Reinhard Maxmelbin Neson (RBIN/EDM3) wrote: Pattern matching problem Hello , Please find the explanation of  my problem below This is a part of a script which should execute in both Windows and Unix .. Based on the O

Re: Pattern matching problem

2005-11-04 Thread $Bill Luebkert
Maxmelbin Neson (RBIN/EDM3) wrote: > > Hello , > > Please find the explanation of my problem below > > This is a part of a script which should execute in both Windows and Unix .. > > Based on the OS the following variables are set > > If Windows $slash = "\\" and If Unix $slash = "/" > > Pa

RE: pattern matching problem

2004-07-30 Thread Joseph Discenza
Craig Cardimon wrote, on Friday, July 30, 2004 11:36 AM : To: [EMAIL PROTECTED]; : [EMAIL PROTECTED] : Subject: pattern matching problem : : : I am searching text files for the keyword Exhibit or Form followed by a : number, a decimal, and any number of letter or numbers within : parent

RE: Pattern matching

2002-11-15 Thread Ricci, Mark
-Original Message- From: Nick Djurovich [mailto:nick_djurovich@;aimtechnology.com] Sent: Thursday, November 14, 2002 5:17 PM To: Ricci, Mark; [EMAIL PROTECTED] Subject: RE: Pattern matching Hi Mark, Looking at the important part of the string ; /search q=court reporting [...] You

Re: Pattern Matching Help

2002-04-16 Thread Thomas R Wyant_III
Balam, You say your code is not working, but you don't say what's wrong. You could try Date::Manip. It may be overkill, of course, and you don't get a Perl date out of Parse_Date; you still need to run it through Unix_Date with the %s format qualifier. And I always seem to have to hold my tongu