Hi All
I Have installed Active perl in my system and I am new to perl and automation...Could some one tell me how to install the perl modules and how to use those modules with the perl for autmating the website ... it will be very helpful for me to start automation...
8 4204
Hi there,
To install the perl modules can refer this link:
http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlmodinstall.html
To answer your 2nd question, it's better to get it from the perl experts from this forum as even am newbiee to perl.
Regards,
Vijayarl
CPAN provides excellent documentatio on installing perl modules. To use the module, you would first install it, then, specify it in the beginning of your Perl script as such:
or even:
Those are real module examples. What you put will depend on what module you are using. To use a module, you have to look at its page on CPAN as it will instruct you in its use.
Regards,
Jeff
If you are using active perl you use the PPM application to install modules. Activeperl comes with a lot of documentation, so find the documentation (in the activeperl folder) and read it.
Automation could mean anything so there is no way to help with that unless you specify what you want or are trying to do.
If you are using active perl you use the PPM application to install modules. Activeperl comes with a lot of documentation, so find the documentation (in the activeperl folder) and read it.
Automation could mean anything so there is no way to help with that unless you specify what you want or are trying to do.
Hi Kevin Thanks for ur reply
What i have to do is I want to Login in to my site by entering username and password and later i want to click on any button for furthur process..
And i am working on windows machine ie Windows XP...
This might help - #!/usr/bin/perl
-
#-----------------------------
-
# GET REQUEST
-
#
-
use LWP::Simple;
-
use URI::URL;
-
-
my $url = url('http://login.yahoo.com/');
-
$url->query_form(username => 'peter', password => 'secret');
-
$content = get($url);
-
-
#-----------------------------
-
# POST REQUEST
-
#
-
use HTTP::Request::Common qw(POST);
-
use LWP::UserAgent;
-
-
$ua = LWP::UserAgent->new();
-
my $req = POST 'http://login.yahoo.com/',
-
[ username => 'peter', password => 'secret' ];
-
$content = $ua->request($req)->as_string;
This might help - #!/usr/bin/perl
-
#-----------------------------
-
# GET REQUEST
-
#
-
use LWP::Simple;
-
use URI::URL;
-
-
my $url = url('http://login.yahoo.com/');
-
$url->query_form(username => 'peter', password => 'secret');
-
$content = get($url);
-
-
#-----------------------------
-
# POST REQUEST
-
#
-
use HTTP::Request::Common qw(POST);
-
use LWP::UserAgent;
-
-
$ua = LWP::UserAgent->new();
-
my $req = POST 'http://login.yahoo.com/',
-
[ username => 'peter', password => 'secret' ];
-
$content = $ua->request($req)->as_string;
Just a bit of advice Uber, it is highly advised and recommended in "Perl Best Practices" to put all of your "use" statements at the top of your script. You don't want to scatter them throughout your script or finding dependencies for scripts will be hell for others. I, personally, would not want to support code that did something like that. I have supported some pretty bad code and it is never fun!
Regards,
Jeff
Just a bit of advice Uber, it is highly advised and recommended in "Perl Best Practices" to put all of your "use" statements at the top of your script. You don't want to scatter them throughout your script or finding dependencies for scripts will be hell for others. I, personally, would not want to support code that did something like that. I have supported some pretty bad code and it is never fun!
Regards,
Jeff
Hey jeff..Thnk u very much..
And one thing i want to know is i can run these scripts in perl express right? or do i need to run in any other toll..Just mention those if possible..
Basically perl express is a editor i am using right now.....
And actually LWP module is itself installed while installing active perl in my sys....ie..LWP perl module pogram is existing in the path C:\Perl\lib\LWP
Do i need to install again if i use these in my scripts
Thanks in advance
Hey jeff..Thnk u very much..
And one thing i want to know is i can run these scripts in perl express right? or do i need to run in any other toll..Just mention those if possible..
Basically perl express is a editor i am using right now.....
And actually LWP module is itself installed while installing active perl in my sys....ie..LWP perl module pogram is existing in the path C:\Perl\lib\LWP
Do i need to install again if i use these in my scripts
Thanks in advance
If its installed, then no, you shouldn't have to install them again, just the once. I don't know anything about Perl Express, but when you run perl scripts, you should really be running them from the command line to test them. Use the following format for that: Sign in to post your reply or Sign up for a free account.
Similar topics
by: Keith |
last post by:
All:
What is the difference between Perl (CGI) and PHP (Apache module)? I thought both used servers to direct the
user to the appropiate Perl or PHP program in order to execute the program to...
|
by: Michael McGarry |
last post by:
Hi,
I am just starting to use Python. Does Python have all the regular
expression features of Perl?
Is Python missing any features available in Perl?
Thanks,
Michael
|
by: Xah Lee |
last post by:
# -*- coding: utf-8 -*-
# Python
# suppose you want to fetch a webpage.
from urllib import urlopen
print
urlopen('http://xahlee.org/Periodic_dosage_dir/_p2/russell-lecture.html').read()
#...
|
by: Someone |
last post by:
there's a korn shell script that i would like to wrap a perl script
around to automate it, as a task i need to do always chooses the same
options from this script (it's menu driven). can i somehow...
|
by: vallinayagam |
last post by:
I wish to know how to automate data entry in web pages using perl.
Thanks in advance.
|
by: Doomster |
last post by:
In a previous job, we had Perl scripts which could interact with a SQL
DB using Perl's DBI module We were able to programmatically add,
delete and query tables using this module.
Is it possible...
|
by: rdps |
last post by:
hello,
I am trying to open up a webpage, say "http://gmail.com", enter username, passwd, click on submit button and do loads of other things - ALL THROUGH AUTOMATION, writing a script in python. ...
|
by: raghavendrap |
last post by:
Hello friends,
I need help to automate verilog modules.
Suppose i have verilog modules
ax.v, bx.v, cx.v, dx.v ---------- individual modules,
...
|
by: somsub |
last post by:
Hi all,
Here is my samle code
use strict ;
use warnings ;
use IO::Uncompress::Unzip ;
When I compiled this three lines of code in win32 I got error like below.
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |