Rahul Sharma wrote at Fri, 09 Aug 2002 10:37:14 +0200:
> I want to "use" a module whose filename is into some variable.
>
> For e.g.
>
> use $filename; # $filename contains the modulename that is to be imported.
>From perldoc -f use
It is exactly equivalent to
BEGIN { require Module; im
module for use must be a bareword.
Try
require $filename;
On Fri, 9 Aug 2002 14:07:14 +0530, [EMAIL PROTECTED] (Rahul
Sharma) wrote:
>Hi All,
>
>I want to "use" a module whose filename is into some variable.
>
>For e.g.
>
>use $filename; # $filename contains the modulename that is to be imp
On Friday, August 9, 2002, at 01:37 , RAHUL SHARMA wrote:
> Hi All,
>
> I want to "use" a module whose filename is into some variable.
>
> For e.g.
>
> use $filename; # $filename contains the modulename that is to be
> imported.
think about when 'use' is dealt with by perl -
it is done in th
On Fri, 2002-08-09 at 04:37, RAHUL SHARMA wrote:
> Hi All,
>
> I want to "use" a module whose filename is into some variable.
>
> For e.g.
>
> use $filename; # $filename contains the modulename that is to be imported.
>
> I'm getting an error.
>
> Please help.
Try something like:
#!/usr/
perldoc -f require
Example:
$filename="/home/me/lib/Foo.pm";
eval "require $filename";
HTH,
José.
-Original Message-
From: RAHUL SHARMA [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 10:37 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Dymanically "use"
Hi All,