03-18-2008
Use $1 instead of \1
Modify the command as below ...
perl -p -e "s/func_a\((.*)?\);/func_b\($1,\n6\);/s" < file |more
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i am getting this error........
find ./ | sed '/\(*\) \(*\)/\2\1/'
Unrecognized command: /\(*\) \(*\)/\2\1/
Any idea???
regards
Apoorva Kumar (4 Replies)
Discussion started by: apoorvasharma80
4 Replies
2. Shell Programming and Scripting
Hi all,
I have a reference named $test. it points to the data structure as follows
'test' =>
},
... (1 Reply)
Discussion started by: Damon sine
1 Replies
3. Shell Programming and Scripting
Here is the question...
Create a new script, sub2, taking three parameters...
1.) the string to be replaced
2.) the string with which to replace it
3.) the name of the file in which to make the substitution
...that treats the string to be replaced as plain text instead of as a regular... (1 Reply)
Discussion started by: johnhisenburg
1 Replies
4. Shell Programming and Scripting
Guys,
May i know how can we de reference the code reference variable.?
my $a = sub{$a=shift;$b=shift;print "SUM:",($a+$b),"\n";};
print $a->(4,5);
How can we print the whole function ?
Please suggest me regarding this.
Thanks for your time :)
Cheers,
Ranga :) (0 Replies)
Discussion started by: rangarasan
0 Replies
5. UNIX for Dummies Questions & Answers
The thread can be closed now :D. (3 Replies)
Discussion started by: vaz0r
3 Replies
6. Shell Programming and Scripting
Hi Perl users,
Could somebody help me to find the solution of my problem below.
Here is my data:
__DATA__
===================================================
NameOfipaddress ippair_1
propertiesx y
propertiesy x... (1 Reply)
Discussion started by: askari
1 Replies
7. Shell Programming and Scripting
Hi all,
I have written a perl code and stored the data into Data structure using Data::Dumper module.
But not sure how to retreive the data from the Data::Dumper.
Eg.
Based on the key value( Here CRYPTO-6-IKMP_MODE_FAILURE I should be able to access the internal hash elements(keys) ... (1 Reply)
Discussion started by: scriptscript
1 Replies
8. Shell Programming and Scripting
I am trying to change a single line of a special file whose comment character is ! to show a path to the file in the comment. such as:
!!HFSS and mcm path: \Signal_Integrity\Package_SI\Section_Models\C4toTrace\28nm\D6HS\SLC_5-2-5\GZ41_ICZ\NSSS\
to a different path and replace the !!HFSS... (1 Reply)
Discussion started by: mobrien601
1 Replies
9. UNIX for Dummies Questions & Answers
i have a text
20 21 22 23 24 25 26
i want to get 22 using sed back reference.
I have used sed 's/{6}\(..\).*/\1/'
but, it does not work.
I am missing something somewhere.
Please help. (5 Replies)
Discussion started by: gotamp
5 Replies
10. Shell Programming and Scripting
I have data that looks like this:
<Country code="US"><tag>adsf</tag><tag>bdfs</tag></Country><Country code="CA"><tag>asdf</tag><tag>bsdf</tag></Country>
I want to grab the country code save it, then drop each new "<..." onto a new line with the country code added to the beginning of each
So,... (9 Replies)
Discussion started by: JenniferAmon
9 Replies
LEARN ABOUT DEBIAN
net::ldap::control::assertion
Net::LDAP::Control::Assertion(3pm) User Contributed Perl Documentation Net::LDAP::Control::Assertion(3pm)
NAME
Net::LDAP::Control::Assertion - LDAPv3 Assertion Control
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::Assertion;
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$assert = Net::LDAP::Control::Assertion->new( assertion => '(sn=Jensen)' );
my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US",
replace => { givenName => "Babs" },
control => $assert );
DESCRIPTION
"Net::LDAP::Control::Assertion" provides an interface for the creation and manipulation of objects that represent the "Assertion Control"
as described by RFC 4528.
The "Assertion Control" allows the client to specify a condition, an assertion, that must be TRUE for the operation to be processed
normally. Otherwise, the operation is not performed. For instance, the control can be used with the Modify operation to perform atomic
"test and set" and "test and clear" operations.
The control is appropriate for both LDAP interrogation and update operations, including Add, Compare, Delete, Modify, ModifyDN (rename),
and Search.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
assertion => FILTER
A filter specifying the assertion that must evaluate to TRUE in order to make the operation process normally.
METHODS
As with Net::LDAP::Control each constructor argument described above is also available as a method on the object which will return the
current value for the attribute if called without an argument, and set a new value for the attribute if called with an argument.
SEE ALSO
Net::LDAP, Net::LDAP::Control, http://www.ietf.org/rfc/rfc4528.txt
AUTHOR
Peter Marschall <peter@adpm.de>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2011 Peter Marschall. 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.14.2 2012-01-29 Net::LDAP::Control::Assertion(3pm)