Re: global variables

2006-01-10 Thread vmalik
I think that a fresh new copy of the module is loaded into memory everytime it is called. That's why your module loses its value. If I want to do something like that, I'd consider storing the value on the hard drive somewhere. Vishal Quoting David Gama Rodrí­guez [EMAIL PROTECTED]: Hello

Re: A question about modules

2005-12-16 Thread vmalik
It is okay to do something like that. However, you should not use the package declaration on the top. If you do that, you will have to use the Exporter module to export your subroutine names to your script when you say use DBConn; Quoting Robert [EMAIL PROTECTED]: I have broken out my DB

Re: one odd question

2005-12-16 Thread vmalik
There is a VRML-Perl module. You can go to CPAN (http://www.cpan.org/), and look for it. Vishal Quoting Gomez, Juan [EMAIL PROTECTED]: Hello guys!! I have to ask you a very odd question I am working on a project that involves VRML (yes I know) these project what it does is that if

Re: Migration of Perl from older version - need help

2005-12-15 Thread vmalik
The current stable version is 5.8.7. What version are you currently running, and on what platform? Quoting Venkat Kumar [EMAIL PROTECTED]: Hi, I am new to Perl. Can some one please help me by giving some tips that I need to look into during migration of an older version of Perl script

Re: Parameterizing a module

2005-12-08 Thread vmalik
I see. Thanks Shawn. Since we are at it, would you mind explaining a little bit about the significance of our keyword. I have never understood it properly. Most books that I referred to say that it's a lexically-scoped global variable. What does that mean? I understand global variables to be the

Re: The Difference Between my Globals and our Globals (WAS: Parameterizing a module)

2005-12-08 Thread vmalik
Shawn, I ran the exmaple that you provided, and it expected as I had the predicted based on the knowledge provided by Wiggins and Bob. Thanks to all of you. Vishal Quoting Shawn Corey [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: I see. Thanks Shawn. Since we are at it, would you mind

Parameterizing a module

2005-12-07 Thread vmalik
Hi all, I have a module which does nothing but include a bunch of use statements (Shawn Corey, I think you taught me how to do that).It looks like this: -- #PerlMQ.pm use strict; use warnings; use statement1; use

Re: Parameterizing a module

2005-12-07 Thread vmalik
Thanks Shawn. But, in this case, how would we send a parameter to the module from the calling script. The module can see the name of the calling script, but I want to make my module available to other perl programmers, and let them have the flexibility of deciding which use statements they want

Re: Help required about NET::TELNET

2005-12-05 Thread vmalik
Hey Mazhar, I don't know much about perl, but in the $telnet-waitfor method, what does the weird parameter mean ('/login: $/i')? I thought that $ means a scalar variable in perl. What do the forward slashes do here? Some sort of regular expression?? Vishal Quoting Mazhar [EMAIL PROTECTED]:

Re: Dates again.

2005-12-05 Thread vmalik
I am assuming that localtime() returns the time in unix file format (number of seconds since 12:00 AM on January 01, 1970). Why don't you convert 72 days to seconds and subtract that number from the output of localtime()? For example, 72 days = 72 x 3600 x 24 seconds = 6220800 seconds So, try:

Referring to the calling script from a module

2005-12-02 Thread vmalik
Hi all, I don't know if the question that I am going the ask fits the beginner level, but I am certainly a beginner in perl. Is it possible for a module to refer to its calling script? For example, if I create a module called MyModule.pm, and use it in a script MyScript.pl by saying use

Adding the use statements to a different file

2005-11-28 Thread vmalik
Hi, I have to write several perl scripts with a number of modules included. Therefore, I have to type many use statements at the top of each script. Is there a way to dump all these use statements in a different file and then just include that file everytime I have to include these use