You might also want to play with "require". That would allow you to
"execute" the entire contents of the file in one operation. However,
you should be aware that there there are some scoping differences
between "eval" and "require". You'll also have to add an addition
line to the file to make the
evaled
code.
Please. Post in
plain text. Ugh.
-Original Message-From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
Venkataramana MokkapatiSent: Tuesday, January 15, 2002 9:16
AMTo: Ron Hartikka; thiyag; perl-win32-users Mailing
ListSubject: R
do('file.pl') - Original Message - From: Ron Hartikka Sent: Tuesday, January 15, 2002 5:50 AM To: thiyag; perl-win32-users Mailing List Subject: RE: problem with eval Seems like a hard way to program! But, maybe it's right for your situation. Please post more if y
Seems like a
hard way to program! But, maybe it's right for your
situation.
Please post
more if you can.
What do you
mean by "it didn't work"?
Try printing
the values returned by eval() - undefined value message indicates bad
code.
-Original Message-From:
"thiyag" <[EMAIL PROTECTED]>
> i have a file with perl statments,I want them to be access few line
> (depends dynamically) in my programe ,
> can anyone suggest me how to go about with it...! i tried reading the
> file line by line extracting the needed line's into an array and th
Justin Rogers wrote:
> You have use strict and use warning turned on and you're using a
> package. When you use it as a program everything is cool. But when it
> is run as a package it wants you to use the package scoped variable. So
> you need to do:
>
> eval 'sub greet { print "$Foo:
ey both work though.
Justin Rogers
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of
$Bill Luebkert
Sent: Monday, April 23, 2001 05:09 AM
To: [EMAIL PROTECTED]
Subject: Re: Problem with eval() and BEGIN { ... }
Steve Hay wrote:
>