i am beginner in perl and need your help to find a solution.. I have a block of multiple lines like below say module 1 to module 100
Like the above lines, i have multiple Making scenarios.. I would need to read the block of lines from making to making and list out number of errors and the error message per module.. Can someone please help to achieve this using perl..
Sample output:
Last edited by Scott; 04-13-2010 at 06:16 PM..
Reason: Code tags, please...
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
I have log file that I need to extract time difference occurance when two events happend, between first occurance of TV and when W_NO happend. also read the value=, below example...I can only read the next line but not able to seach all the next lines untill i see W_NO..
Thanks for your help.... (6 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Hi all,
I have a vcd file with a bunch of lines containing an array, like this
$var wire 1 b a $end
$var wire 1 c a $end
$var wire 1 d a $end
$var wire 1 e a $end
$var wire 1 f b $end
$var wire 1 g b $end
$var wire 1 h b $end
$var wire 1 i b $end
I want it like this:
$var wire 1 e a... (12 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Hi,
I am looking for a shell script which serves the below purpose.
Please find below the algorithm for the same and any help on this would be highly appreciated.
1)set of strings need to be replaced among set of files(directory may contain different types of files)
2)It should search for... (10 Replies)
Hi,
I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error.
Unfortunately, this is not a fool proof script.... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT MOJAVE
net::ldap::message
Net::LDAP::Message(3) User Contributed Perl Documentation Net::LDAP::Message(3)NAME
Net::LDAP::Message - Message response from LDAP server
SYNOPSIS
use Net::LDAP;
DESCRIPTION
Net::LDAP::Message is a base class for the objects returned by the Net::LDAP methods abandon, add, bind, compare, delete, modify, moddn,
search and unbind.
The sub-class Net::LDAP::Search returned by search also defines many methods.
If the Net::LDAP object is in async mode then all these methods, except "done" and "mesg_id", will cause a wait until the request is
completed.
METHODS
code ( )
The code value in the result message from the server. Normally for a success zero will be returned. Constants for the result codes can
be imported from the Net::LDAP or Net::LDAP::Constant module.
control ( )
Return a list of controls that were returned from the server.
control ( OID, ... )
Return a list of controls with the given OIDs that were returned from the server.
dn ( )
The DN in the result message from the server.
done ( )
Returns true if the request has been completed.
error ( )
Returns the error message in the result message from the server. If the server did not include an error message, then the result of
ldap_error_desc with the error code from the result message.
error_name ( )
Returns the name of the error code in the result message from the server. See ldap_error_name for a detailed description of the return
value.
error_text ( )
Returns the short text description of the error code in the result message from the server. See ldap_error_text for a detailed
description of the return value.
error_desc ( )
Returns a long text description of the error code in the result message from the server. See ldap_error_desc for a detailed description
of the return value.
is_error ( )
Returns true if the result code is considered to be an error for the operation.
mesg_id ( )
The message id of the request message sent to the server.
referrals ( )
Returns a list of referrals from the result message.
server_error ( )
The error message returned by the server, or "undef" if the server did not provide a message.
sync ( )
Wait for the server to complete the request.
SEE ALSO
Net::LDAP, Net::LDAP::Search, Net::LDAP::Constant, Net::LDAP::Util
ACKNOWLEDGEMENTS
This document is based on a document originally written by Russell Fulton <r.fulton@auckland.ac.nz>.
AUTHOR
Graham Barr <gbarr@pobox.com>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>.
COPYRIGHT
Copyright (c) 1997-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
perl v5.18.2 2013-07-21 Net::LDAP::Message(3)