Questions tagged [perl-module]

A Perl module is a reusable portion of Perl code.

In Perl, modules are vital to object-oriented design and can provide static variables referenced similarly to those in C++. The package model improves code organization, by allowing the coder to import functions from external files and 'bless' new object instances. Further, perl allows the directory structure holding modules to aid in the description of an object hierarchy. Perl module files traditionally have the extension '.pm'

see perlmod - perldoc.perl.org for more information.

1358 questions
-1
votes
1 answer

Installing Wordnet module perl in Windows 10

i used the command cpanm WordNet::Similarity the first time it generate error for installing the dependencies wiht the package WordNet::QueryData and the problem seem to be described byt this error message * Please set the WNHOME environment…
-1
votes
2 answers

Replace the last line written to a file descritor

I am writing a small perl program where I am checking the pattern of #start and #end. The agenda is to create a separate file with the lines in between start and end patterns. This I am able to do with below script. #!/usr/bin/perl …
user1939168
  • 547
  • 5
  • 20
-1
votes
1 answer

UPDATE query is not working in DBI

use DBI; my $jobID = 1; $dbh = DBI->connect("dbi:mysql:$database:$db_server", $user, $password) or die "Connection ERROR!"; $dbh->do('USE MultiRunScheduler'); $dbh->do('UPDATE Scheduler SET RequestStatus="CANCELED" WHERE ID="$jobID";') print…
Nikhil Hegde
  • 341
  • 1
  • 3
  • 15
-1
votes
2 answers

string comparison in foreach

The below test is to check the software information on a list of IP addresses. The program prints the version of software running on all the IPs as expected. Now, I would like to test whether the software running on all the IPs are identical? How…
nims
  • 103
  • 1
  • 8
-1
votes
1 answer

Comapring Two Arrays in Perl For Same Values

Lets say i have two arrays @array1 holds the below values branches/test1/a.txt branches/test2/b.txt branches/test2/c.txt and @array2 branches/test1/a.txt branches/test2/b.txt branches/test2/c.txt I need to Compare both the arrays and do…
John
  • 89
  • 1
  • 10
-1
votes
1 answer

Return multiple values from a function in hash

I have created a function which essentially logs into a router,executes a command, parses the command output and prints the Peer status and Peer ip Function returns the values as expected. In addition to status and peer ip if i want to return 3…
virat
  • 3
  • 1
  • 2
-1
votes
2 answers

Simple perl opendir

I am completely new to perl and have just been learning it. I came across this script I need to run that has some network Tstat trace data. However, I get an error 'Cannot parse date.' The code that generates this is here foreach my $dir…
sfactor
  • 12,592
  • 32
  • 102
  • 152
-1
votes
1 answer

Can't install perl package Games::Irrlicht - fatal error

I'm trying to install the CPAN module Games::Irrlicht to deal with graphics. Some file isn't getting downloaded properly or something, resulting in a fatal error. What's wrong? My terminal output: cpan[1]> install Games::Irrlicht Reading…
Menasheh
  • 3,560
  • 3
  • 33
  • 48
-1
votes
3 answers

Cannot use already installed Perl Module on cPanel

I have already successfully installed the Perl module Crypt::CBC on cPanel. But when adding the line "use Crypt::CBC;" I am getting the error: Can't locate Crypt/CBC.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi…
john
  • 93
  • 9
-1
votes
1 answer

Not enough arguements for perl module-Compilation error

Hi I have a Perl script named feed_validator.pl. From this, I am calling a Perl module named fetch_sequence_vals.pm as follows: my ($AIT_hash_ref,$SE_hash_ref,$SBC_hash_ref,$db_pack_val_tpb)=fetch_sequneceVals::seqVals(); fetch_sequence_vals.pm…
nithin
  • 23
  • 4
-1
votes
1 answer

perl argparse with less dependencies

I would like to use Getopt::ArgParse, as it provides a more userfriendly interface then Getopt::Long. Now the problem is that Getopt::ArgParse requires Moo, which in turn requires a whole bunch of packages that are not included in the standard…
Isaac
  • 810
  • 2
  • 13
  • 31
-1
votes
3 answers

read xml file without any XML module

I am trying to read a XML form using Perl but I can not use any XML modules like XML::Simple, XML::Parse. It is a simple XML form which has some basic information and a MS Doc attachment. I want to read this XML and download this attached Doc file…
r-developer
  • 517
  • 1
  • 8
  • 21
-1
votes
2 answers

Format date time stamp

I get the output of perl gmtime(epoch) like below. Thu Jul 23 07:19:52 2015 I want to modify it to a directory name like below using perl. What's the best way ? 2015072307
Ani
  • 109
  • 2
  • 12
-1
votes
1 answer

Devel::Cover report Branch and condition Coverage shows n/a in the report ??

I am generating the coverage for some .pm and mason file using apache by using Devel::Cover But for the mason file the coverage for branch and condition is showing n/a while for the same mason file statement coverage is coming 100%. Please Help.
-1
votes
1 answer

Perl script to convert xlsx to xml giving error

I am trying to convert xlsx to xml using Perl modules. According to my requirement the Perl script should take .xlsx file and convert to .xml format exactly. While compiling my code I am getting error: print() on unopened filehandle XML at…
Sri
  • 33
  • 1
  • 8