Hi shahj,
Instead of "require package_name" you may say use package_name.
As 'require' is not bringing in the symbols. Only 'use' does it.
You should always use 'use' when you wanted to bring in the symbols
inside your script from the package.
More importantly the package 'package_name' should
Prasanna kothari wrote:
>try this
> "use lib ";
Randy W. Sims wrote:
>push( @INC, $path );
>require package_name;
>package_name->import(); # pulls in exported symbols
Well these are real sweet ways, I agree. No BEGIN blocks required
and no hassles.
But is there any way to avoid this Expor
Well,
All the above said answers are perfectly fine, but just to make it more
efficient what we can do is, we can avoid the if statement or ?:
operator.
This is because whenever we go for a decision statement, it takes some
extra processing time.
A solution to avoid using if or ?: is as follows
Hi,
Whenever you pass two arrays (or any number of arrays for that matter)
as arguments to a function, what happens is they get flattened and
become a single list and then it is assigned to @_.
So when U say
>
> my (@array1, @array2) = @_; # is this correct? How do I do it?
>
@array1 has
Hi Jenda,
That was amazing. It was a good learning for me, and I never knew
about Benchmark...
Sorry for that...
My reasoning was absolutely logical and nothing systematical
Thanks for the great reasoning which was real real systematical.
But the same script in my environment gives me
Hi,
First of all are you sure that the program didn't give any compilation
errors??
>
>my stps="/usr/local/log/scratchtps";
>
I think that's a typo. It should be $stps
The code that you have given, is it complete??
Coz you are saying 'use strict' and without "my"ing you are using $logf,
$irmt
Hi Anish,
.* always tries to match as much as possible.
So the code you have sent takes the first [% and the last %] and
replaces everything in between.
If the contents in between the openTag and the closeTag is ONLY "word
characters" (i.e., _, 0-9, a-z, A-Z) then you may change the regEx to
s
Hi all,
May be this is a OLD topic of discussion.
I have a Perl script with lot of functions. This Perl script accepts two
command line options (string values) where the concatenation of these
two strings will give me the function name.
All the functions in this Perl script are like this.
For
Some one please do help me
I'm sure that there could be better solution and I'm sure that someone
would have faced a similar situation.
Do let me know your best possible solution for this scenario.
>Subject: Calling functions using variable (I mean symbolic refs)
>
>
>
>Hi all,
>
>
>May be
>Show me the entire script or at least a better
>idea of what is in it than the outline given below.
The complete script is really t lengthy and that is the reson why I
have exactly given an outline.
Anyways again I'll explain what I'm looking for.
If you have observed in that code, the
Thanks for your valuable information.
Will try perlmonks now.
With Best regards,
R. Kamal Raj Guptha.
Ph: 91-80-28411990 Ext:1296
Mobile - 9880351218
>-Original Message-
>From: Charles K. Clarkson [mailto:[EMAIL PROTECTED]
>Sent: Friday, November 26, 2004 3:06 PM
>To: [EMAIL PROTEC
Hey Paul,
That's a clever way of achieving the task.
Thanks for that.
With Best regards,
R. Kamal Raj Guptha.
Ph: 91-80-28411990 Ext:1296
Mobile - 9880351218
>-Original Message-
>From: Paul Johnson [mailto:[EMAIL PROTECTED]
>Sent: Friday, November 26, 2004 5:32 PM
>To: R. Kamal Raj Gu
12 matches
Mail list logo