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

getValue from an XML having same attributes using Perl XMLDOM parser

I am trying to get the value of 'TaxAmount' from the below XML which contains same tag name at different places. From the below XML, I want to get the value of 'TaxAmount' as '7.2' under tag 'Order', but I'm always getting the 'TaxAmount' as '1.2'…
Logunath
  • 477
  • 1
  • 8
  • 20
-1
votes
1 answer

How to send an html page as an attachment with email in Perl

I recently started programming I know how to send a mail in perl, but I am generating a Scrollable tables in HTML page and I need to send it as an attachment in Perl and I have no idea about it. Could anyone help me? Edit: This question is different…
AbhiNickz
  • 1,035
  • 2
  • 14
  • 32
-1
votes
1 answer

how to grep between two lines in perl

I have got 1 file which looks like…
Raj
  • 757
  • 4
  • 11
  • 22
-1
votes
1 answer

Multi-line regex in Perl

I have written a Perl script which parses the output of a command, looks for the task name in the command output and prints the task name. Command output looks like the below Here task name is 'mutipleregexpression'. But part of the word 'pression'…
user3587025
  • 173
  • 1
  • 4
  • 17
-1
votes
1 answer

memory issue occurs randomly for few jobs

I am receiving a out of memory issue when providing the huge file data as a argument. I have checked the memory size it has free space 2045 mb. Is that sufficient for the swap space to sort the records in hash ref value. please let me know what…
Arun A
  • 1
  • 1
-1
votes
1 answer

windows7 can't install NET-SNMP perl module

I download net-snmp package from official website, and the version is 5.7.3 . However, everytime I tried execute build.bat file it just show up : print screen Installed : ActiveState Perl 5.20.1.2000 Microsoft Visual Studio professional 2012 Win32…
-1
votes
3 answers

Perl : search a keywords from a file and display the occurence

I have two files 1. input.txt 2. keyword.txt input.txt has contents like .src_ref 0 "call.s" 24 first 0x000000 0x5a80 0x0060 BRA.l 0x60 .src_ref 0 "call.s" 30 first 0x000002 0x1bc5 RETI .src_ref 0 "call.s"…
vk41286
  • 113
  • 1
  • 1
  • 10
-1
votes
2 answers

How to run set of .exe files in a folder through .bat file using perl script

I am beginner to Perl and I have to create a .pl file and I have folder containing near about 30 exe files(inside Folder1 in G:\Folder1). All of them must be executed by click to the .pl file. My try is : use strict; use warnings; use autodie; …
user3085082
  • 133
  • 4
  • 16
-1
votes
1 answer

how to execute the perl script when the script names are written in txt file

Question : I have a normal txt file which has Perl Script names and flag set to it,please see example below, i want to read that txt file and if the flag is set to 1 then execute the perl scripts . How to do this ? test.txt TC1connect.pl =…
-1
votes
1 answer

Substituting variables while reading text file

I have a text file as below and saved it as "file.txt" "create variable $VAR alarm_object 0" I am trying to read this in a perl script and printing it by substituting the "$VAR" variable $VAR = TEMP_VAR open (FILE,"<", "file.txt") or die $!; …
Mohan
  • 463
  • 3
  • 11
  • 24
-1
votes
2 answers

Perl execute a command at a specified time

I need to write a perl script that executes a command at a specified time. use net::ssh::expect to login to a router read the time from the router's clock ("show clock" command displays the time.) At the 17:30:00 execute a command. I tried writing…
-1
votes
3 answers

Perl Date conversion with Perl's built-in functions

I have a date in the following format which is how it is stored in an external application 06/12/2014 6:31 PM IST I want to change this format to which needs to check AM and PM also and rest of the minutes to be hardcoded as :00+5:30 2014-06-12…
user3264858
  • 51
  • 1
  • 8
-1
votes
1 answer

How do I install Devel::REPL including `optional_features` from the distro meta file?

How do I install Devel::REPL including optional_features from the distro meta file? Meta file: Devel-REPL-1.003025 / META.json Tried with cpanm and cpan. PERL_MM_USE_DEFAULT=1 does not help.
daxim
  • 39,270
  • 4
  • 65
  • 132
-1
votes
1 answer

Send sms using perl script

I'm trying to send sms using perl script. I have tried the below modules. Please help me .. use strict; use warnings; use Net::SMS::160By2; my $username = "xxxxx"; my $password = "yyyyy"; my $msg = "Hi"; my $to = "zzzzzz"; my $obj =…
Vasanth
  • 201
  • 1
  • 12
-1
votes
1 answer

to get output from variable

use strict; use warnings; $manifest=read_file("release.ms1"); print "$manifest\n"; my @new=split('\.',$manifest); my %data=@new; print "$data('vcs version')"; content of the release.ms1…
Kalaiyarasan
  • 267
  • 3
  • 6
  • 13