The scripts are called from cron.
I could modify all the scripts writing one more perl script, that's not a problem. But scripts once modified, it's the testing that takes lots of time.
I need to execute a sub-routine from a module everytime I run a perl script. This sub-routine sets the library path depending on the base path of the script.
Easier way would be modify the script and add code to execute this sub-routine. But we have hundreds of scripts to edit which we are not...
Hello, I am trying to install DBD::Oracle and I am getting the following error when I do make test. Can someone let me rectify this.
Thanks.
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base................Failed to load...
I have the following XML file in the below format:
<root>
<clients id="4">
<name>temp</name>
<order>yes</order>
</clients>
</root>
I am using XML::Parser Tree Style and the Dumper gives me:
$VAR1 = [
'root',
[
{},
0...
What is the general purpose that I can use keys and values in the blessed hash for? Are these used only for initialization variables that the script gives to constructor? If all private values and references are assigned to 'my' variables in the class, where does one need to use these blessed...
I have the following class:
package MyClass;
sub new {
my $classname = shift;
bless {'a'=>1,'b'=>2}, $classname;
}
1;
And I am accessing the class in my script as below:
#!/usr/bin/perl -w
use MyClass;
my $objref = MyClass->new();
print ref($objref) . "\n";
print for...
This should give you a starting point:
#!/usr/bin/perl
use strict;
my @fields = ("title","author","pub-date","format","publisher");
my %fields_hash = ("title",1,"author",1,"pub-date",1,"format",1,"publisher");
while (<>) {
my $string = $_;
my (@pairs) = split(/:/, $string);
my @sequence =...
I think 'use' would not work because it requires and imports the modules at compile time. Symbolic references would do at run time, so is the error.
I tried with 'require' and it didnt work. Though require would not import modules at compile time, it might be because 'require' checks the...
It's because only package variables are visible to symbolic references (that's what we are using here). Lexical variables (declared with my()) aren't in a symbol table, and thus are invisible to this mechanism.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.