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
2 answers

What's wrong with my CGI::Session installation?

I installed CGI::Session module on my host by creating the perl-modules directory in my cgi-bin and then extracting the module to that directory so I have: D: cgi-bin/perl-modules/CGI/ F: cgi-bin/perl-modules/CGI/Session.pm D:…
user105033
  • 18,800
  • 19
  • 58
  • 69
-1
votes
2 answers

update Conf File using perl

I am using perl script to update sections in conf file . my script i working properly but when i execute script the ordered on sections changed automatically while i dont want to change the order.script is following . #!/usr/bin/perl use…
user2916639
  • 388
  • 1
  • 3
  • 18
-1
votes
1 answer

Need to print the following data in to CSV file

I have a piece of code which creates an excel sheet and put the data in. The following is the code that does #CREATE FORMATTING FOR EXCEL FILE print DEBUG &now() . "Setting up the XLS document\n"; my $XLS_FILE =…
Vishnu J
  • 89
  • 1
  • 8
-1
votes
1 answer

Select statement should return only one record

I want to fetch and print only one record from database mysql. #Select backlogs { my $backlog_req = "select id, name, startDate, endDate, parent_id " . " from backlogs " ; …
samio peter
  • 191
  • 2
  • 2
  • 8
-1
votes
1 answer

how do i use Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers

I want to use module Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers to check for magic numbers only in a .C file use strict; use warnings; use Perl::Critic; open(my $FILE, "< test.c") or die $!; my $critic = Perl::Critic->new();…
Ad-vic
  • 519
  • 4
  • 18
-1
votes
1 answer

How to take IP address as input

How to take IP address as input and use it in the Xpath expressions? When i am using it as a static input like $iptext = '10.109.25.1'; it is working fine but when i am getting the input from user i am getting error #my $ip = <>; #my…
JustCoder
  • 327
  • 1
  • 4
  • 13
-1
votes
1 answer

Copy only the text until special character on every line into another file

I have a text file which contains the following data: ChainCtrlBuildChain() : ChainController.c ChainCtrlDumpChain() : ChainController.c ChainCtrlDumpChanCallback() : ChainController.c ChainCtrlExit() : ChainController.c ChainCtrlGetBitStreamChan()…
Ad-vic
  • 519
  • 4
  • 18
-1
votes
1 answer

To delete Multiple block of data from a file in perl?

The above entry comes in my file for around four times and I want to remove those entries from the file, so I'm using the following logic: #!/usr/bin/perl $count=0; open (FILE,…
user1954970
  • 409
  • 1
  • 5
  • 14
-1
votes
2 answers

Module Installation errors when trying to use local::lib and CPAN

I am trying to use local::lib as I don’t have admin rights on the system and I want to download and install a local library. I ran following: perl Makefile.PL --bootstrap make test && make install echo 'eval $(perl -I$HOME/perl5/lib/perl5…
-1
votes
1 answer

perl script crashing while calling win32 dll

I have a win32 dll built using _cdecl calling convention which exported one function as : extern __declspec(dllexport) char* myfunc(char* param1, char* param2, char* param3, int param4, int param5) I am calling this function from perl script like…
Kallol
  • 302
  • 4
  • 16
-1
votes
2 answers

Install Zlib and Gzip modules for old version perl

I'm trying to get the perl Gzip module installed for a 5.8.1 version, can't find a rpm around so I did a manual install by copying over the files of a 5.10 install. I've read through the suggestions in Manual installation of a Perl Module but it…
fy_iceworld
  • 656
  • 2
  • 10
  • 20
-1
votes
1 answer

Using XML::Saxon::XSLT2 in Perl Errors

I am currently trying to use the XSLT2 module in a Perl script. I am currently getting an error when running the script due to including this module. The main error statement is: Transformer.java:1: error: package net.sf.saxon.s9api does not…
OstrichProjects
  • 318
  • 1
  • 2
  • 13
-1
votes
1 answer

How to search for a particular string and goto sleep if not found in perl?

I have two test cases in log file ActivateJob and GetJOBStatus as below, my perl script currently set to PASS as default and it searches for Error in the below test cases, if it finds error in the below it makes test case as FAIL. For GetJOBStatus…
user1954970
  • 409
  • 1
  • 5
  • 14
-1
votes
1 answer

Perl Message::Stack example

I am using Perl to try to implement an example for the Message::Stack module from CPAN. I get the error Can't locate object method "new" via package "Message::Stack" at stack.pl line 3. my $stack =…
Vinod HC
  • 1,557
  • 5
  • 20
  • 38
-1
votes
1 answer

Use of uninitialized value in subroutine entry at mytest.pl

#!/usr/bin/perl use strict; use warnings; use List::Util qw(min max); use Set::IntervalTree; use GenomeLookupUtil; my $chromCol = 0; my $startCol = 0; my $endCol = 0; if($ARGV[2] eq "VSC") { $chromCol = 0; $startCol = 1; $endCol =…
Syed
  • 19
  • 1
  • 6