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
-2
votes
1 answer

perl script to automate web clicks and pass value to web pasge

I have a webapp hosted in a webpage, I access the page using url,this page has a text box and start button.can i pass a value in the text box and click the start button automatically by using Perl script. I have used WWW::Mechanize module. I am able…
-2
votes
1 answer

Change an XML attribute value using XML::Twig

I want to change an XML attribute value using XML::Twig. I can do this by using XML::LibXML like this my $doc = XML::LibXML->new->parsefile(); my $xpath = '/model/@name'; my ($attr) = $doc->findnodes($xpath); …
user1575765
  • 60
  • 3
  • 10
-3
votes
2 answers

How can I read an XML look like file using perl's XML Simple? A file with non xml extention

I know that XML Simple will read xml files but what if i have a .cfg or .txt file but in XML format? Can I read them using xml simple? Thank you. Edit: Thanks for the negative votes!!!! use XML::Simple; use Data::Dumper; $file = "mytemp.txt"; my…
infinitloop
  • 2,863
  • 7
  • 38
  • 55
-3
votes
1 answer

What should If I want to check whether my union is list or string in perl

I need to write an union function using Perl, and what I did is here, questions is followed by code. sub union { my @array1 = qw/a b c d/; my @array2 = qw/a f g h/; my %myunion = (); @myunion{ @array1, @array2 } = (1) x ( @array1 +…
nicken
  • 43
  • 2
-3
votes
2 answers

How can I do natural sort in hash?

use strict; use warnings; use 5.010; my $value; my $key; my %hash_keysort = ( servlet => 'true', servlet_dude => 123, hai => "null", array => 123 ); I want to get same output. I tried with this package use…
-3
votes
1 answer

Retrieve online data and generate an xml file

Whenever I run the following Perl script I got the errors below Use of uninitialized value $date in concatenation (.) or string at D:\sagar\toc\Online_TOC.pl line 111, <> line 1. Use of uninitialized value $first_page in concatenation (.) or string…
Sagar
  • 43
  • 13
-3
votes
1 answer

Perl ::To find the no of occurenaces and max min value

Please help me to find the no of occurrences in file. also to find the max and min values. Im able to find the no of occurrences. file SQL :: select * from person ...etc , Time Taken :: 30 SQL :: select * from emp ...etc , Time Taken :: 5 SQL ::…
-3
votes
3 answers

cant execute perl script - Strange error

I have written a perl script which running fine in my system but not working in some other system. It is showing error "can't execute ...... at line 1". everything is set up. I have tested in version 5.8.2 and working fine. But in 5.8.6 it is not…
r-developer
  • 517
  • 1
  • 8
  • 21
-3
votes
1 answer

Can't locate CM.pm in @INC in perl

I am trying to run perl script which contain use CM, use CM_USER and use CM_METRICS statement and I am getting error "Can't locate CM.pm in @INC". I have also tried to install these using CPAN but it also giving me error "cannot install".
-3
votes
2 answers

I want to send email through perl, what kind of setup is required for it?

I've tried using these different modules given by Perl for sending email: Email::MIME Email::Sender Email::Simple I cannot figure out whats wrong. Is there any pre-setup required for these modules to work?
Vidur Oberoi
  • 75
  • 1
  • 3
  • 12
-3
votes
2 answers

Perl Module Missing Error

I am a new guy learning perl and working as it goes. I am really stuck at this point, been working on this thing for past 4 Hr without any results. I am using a bunch of custom Modules inside a directory and then I got a ticket to implement a new…
Parik Tiwari
  • 1,525
  • 1
  • 12
  • 19
-4
votes
1 answer

How to split path up to certain hierarchy

I want to use Perl to split the path funit/pipe/str/str32/gt/split up to funit/pipe/str/str32/gt using a regular expression.
-4
votes
1 answer

I want to write my hash map data into Excel

Below is the output I got when I use print Dumper(\%Data) in my code { "" => undef, "123456789012:SRIRAMA" => [123456789012, "SRIRAMA", 856.06, 0, 0, 0], "389252737122:RAMA" => [389252737122, "RAMA", 345.76, 0, 0, 0], } This data I have to…
Rama
  • 1
  • 3
-4
votes
1 answer

How can I handle multiple outlook accounts using Perl

I have task to read mails from secondary mail account from outlook using perl.
-4
votes
1 answer

How to avoid the hard coded username/password in perl script

How to avoid the hard coded username/password in perl script I am new to perl I have tried lot of things nothing worked out for me, Please help to provide some method to read the username/password from config file. What things I need to change here,…
user2767714
  • 51
  • 1
  • 4
  • 12
1 2 3
90
91