01-06-2011
calling perl subroutine from perl expect module
All,
Is it possible to call a subroutine from the perl expect module after logging to a system that is within the same program. My situation is I need to run a logic inside a machine that I'm logging in using the expect module, the logic is also available in the same expect program.
Thanks,
Arun V
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Problem: I have a shell script that will be called by a Perl module that will connect to a db and delete rows. The Perl module will be called by CRON. I am using a Perl module to call a shell script because I need to get the db connection from Perl.
Here is the Perl pseudocode:
... (4 Replies)
Discussion started by: mh53j_fe
4 Replies
2. Shell Programming and Scripting
I want to replace a Perl module name in all my Perl Scripts in the cgi-bin directory. How is it possible?
I have the following statement in my scripts
use myUtil;
I want to change it to
use myUtil777;
Regards,
Rahul (2 Replies)
Discussion started by: rahulrathod
2 Replies
3. Shell Programming and Scripting
I call a EXPECT script from my perl script with machine IP and a FIle. The script logins to the machine and exports the value. The values to be exported or stored in a file.
I have close to 10 machines and I have created 10 files and pass the corresponding files in command line, Now I could like... (4 Replies)
Discussion started by: ramkriz
4 Replies
4. Shell Programming and Scripting
Hi,
I can't get this script ot work and I wa wondering if anyone could help?
I need to open a file and use a subroutine to search each line for a regular expression. If it matches then I need to return a match from the subroutine and print the result?
Any help would be greatly... (11 Replies)
Discussion started by: jmd2004
11 Replies
5. Shell Programming and Scripting
Hi All,
I have a doubt whether expect module in perl will work in SQL prompt or its applicable only for shell prompt ?
Thanks,
Arun V (2 Replies)
Discussion started by: arun_maffy
2 Replies
6. Shell Programming and Scripting
The following subroutine prints 1 instead of the content of the Equipment variable. Can someone tell me why?
#!c:/perl/bin/perl.exe
#
use strict 'vars';
my $Equipments = "data/equips.txt";
unless (open(EQUIP_FH, "$Equipments")) {
print "errors: $Equipments\n"; # This line prints... (1 Reply)
Discussion started by: tqlam
1 Replies
7. Shell Programming and Scripting
Hi,
ive a perl script, where it has a subroutine clear() in it, and i've one shell script which runs in background, from that shell script i wanted to call subroutine which is in perl script, that's perl script is not module, just simple script.
Eg:
perl script <test>
#!... (4 Replies)
Discussion started by: asarunkumar
4 Replies
8. Programming
Hi everyone,
I have given up finally trying to find a way to do this.
I have a subroutine called LoginFirst where I am starting a new SSH session.
I have bunch of subroutines, each one of them uses a (or I have to create
a new SSH constructor everytime) ssh connection to get some value so ... (2 Replies)
Discussion started by: dummy_code
2 Replies
9. Shell Programming and Scripting
Hello All,
I am in the process of learning perl.I have a perl script and based on the arguments passed it would the appropriate subroutine that is defined in the script.
Now, I need to check a value that is defined in the Environment variables and should call the subroutine only if the... (1 Reply)
Discussion started by: filter
1 Replies
10. Shell Programming and Scripting
Hi,
I am an occasional PERL user. I am trying to call a sub routine (passing parameters) in perl module from a driver .pl file. I have been "tinkering" for a while now and have confused myself.
Could someone please look at the code below and spot where I am going wrong.
testPerl.pl
... (0 Replies)
Discussion started by: chris01010
0 Replies
LEARN ABOUT DEBIAN
net::dri::logging
Net::DRI::Logging(3pm) User Contributed Perl Documentation Net::DRI::Logging(3pm)
NAME
Net::DRI::Logging - Logging Operations for Net::DRI
VERSION
This documentation refers to Net::DRI::Logging version 1.02
SYNOPSIS
This module is never used directly, only its subclasses are used. See the subclasses documentation: Net::DRI::Logging::Files,
Net::DRI::Logging::Null and Net::DRI::Logging::Stderr. See also Net::DRI documentation and its "logging()" method.
DESCRIPTION
This is the superclass of all logging modules (under the Net::DRI::Logging::* namespace).
EXAMPLES
See Net::DRI documentation.
SUBROUTINES
/METHODS
This is mostly a pure virtual superclass. All subclasses should have the following methods:
new()
a ref hash is passed with some keys ; besides keys specifically related to the logging class used, some keys are (or should be)
understood by all clases.
They are:
level
current level of logging (no messages below this level would be dumped), between: debug info notice warning error critical alert
emergency ; default: warning
It can be changed anytime later by using the level() method
xml_indent
0 or 1 depending if you want your XML strings to be dumped as a long line(0) or indented for humans(1) ; default: 0
encoding
if needed, name of encoding to use to convert data stream ; default: UTF-8
name()
returns the name as string of the logging modules
setup_channel(SOURCE,TYPE,DATA)
prepare for a new channel of data comming from SOURCE (package name), of TYPE ; DATA is a ref hash of additional parameter, such as
filenames, etc.
output(LEVEL,TYPE,DATA1,DATA2,...)
add data to channel type TYPE at level LEVEL ('debug', 'info', 'notice', etc.) ; DATA is a ref hash with all data to log or a simple
string (the message) ; the logging module should know what to do with it and how to format it (which may depend on the TYPE attribute,
which itself is tied to the SOURCE attribute of "setup_channel()").
DIAGNOSTICS
None.
CONFIGURATION AND ENVIRONMENT
See the "new()" method.
DEPENDENCIES
This module has to be used inside the Net::DRI framework and needs the following components:
Net::DRI::BaseClass
Net::DRI::Util
Net::DRI::Exception
INCOMPATIBILITIES
None.
BUGS AND LIMITATIONS
No known bugs. Please report problems to author (see below) or use CPAN RT system. Patches are welcome.
The interface could be later changed to suit Log::Log4Perl or other Perl standard logging modules, if needed.
Other subclasses should be created to cater for other logging destinations (such as a RDBMS).
Net::DRI expects these logging modules to be non-blocking and returning immediately.
This logging framework is currently only used by Net::DRI::Transport::Socket, it should get applied to other transports and other internal
parts of Net::DRI.
When LocalStorage do appear inside Net::DRI, logging should probably use it (TODO).
SUPPORT
For now, support questions should be sent to:
<netdri@dotandco.com>
Please also see the SUPPORT file in the distribution.
SEE ALSO
<http://www.dotandco.com/services/software/Net-DRI/>
AUTHOR
Patrick Mevzek, <netdri@dotandco.com>
LICENSE AND COPYRIGHT
Copyright (c) 2009,2010 Patrick Mevzek <netdri@dotandco.com>. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See the LICENSE file that comes with this distribution for more details.
perl v5.10.1 2010-03-25 Net::DRI::Logging(3pm)