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
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::
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
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.
> > >
> > >
> 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
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
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
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
$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
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
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
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
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
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
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
-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
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
17 matches
Mail list logo