i can see
the output of grep looks like "0" and "1" so the variable $req_user_info is holding numbers. but i would require something like search for the pattern and when match is found store that line in variable
Hello guys/gals,
i am sorry as this is probably very simply but i am slowly learning perl and need to convert some old korn shell scripts.
I need to be able to search a file line by line but only match a string at particular location on that line, for example character 20-30. So my file... (4 Replies)
Hi All
I want to search a string from an array in Perl. If a match occurs, assign that string to a variable else assign 'No match'. I tried writing the script as follows but it's in vain. Please help me..
#!/usr/bin/perl
use strict;
my $NER;
my @text=("ORG","PER");
... (4 Replies)
Hi,
I have a file having around 30 records. Each record has 5 fields delimited by PIPE. Few records in the file having Junk characters in the field2 and field4.
I found the junk charcter and I tested it and replace the junk with space with the command below
perl -i -p -e "s/\x00/ /g"... (1 Reply)
Hi,
I am using KSH shell to do some programming.
I want to search array and print index value of the array.
Example..
nodeval4workflow="DESCRIPTION ="" ISENABLED ="YES" ISVALID ="YES" NAME="TESTVALIDATION"
set -A strwfVar $nodeval4workflow
strwfVar=DESCRIPTION=""... (1 Reply)
How to reverse search for a matched string in a file. Get line# of the first matched line. I am getting '2' into 'lineNum' variable.
But it feels like I am using too many commands. Is there a better more efficiant way to do this on Unix?
abc.log
aaaaaaaaaaaaa
bbbbbbbbbbbbb... (11 Replies)
Hi,
I want the Perl script with versions 5.8.2 and 5.8.5 starting with
#!/usr/bin/perl
The Perl program should read the excel file or text file line by line and taking into an array and search in the UNIX directories for reference file of .jsp or .js or .xsl with path .The Object names... (2 Replies)
Hi,
i want to search and replace array values by using perl
perl -pi -e "s/${d$i]}/${b$j]}" *.xml
i am using while loop for the same. if i excute this,it shows "Substitution replacement not terminated at -e line 1.".
please tell me what's wrong this line (1 Reply)
I'm trying to find a way to search a range of similar words in a file. I tried using sed but can't get it right:sed 's/\(ca01\)*//'It only removes "ca01" but leaves the rest of the word. I still want the rest of the information on the lines just not these specific words listed below. Any... (3 Replies)
How to grep for searching a string within a begin and end pattern of a file.
Sent from my Redmi 3S using Tapatalk (8 Replies)
Discussion started by: Baishali
8 Replies
LEARN ABOUT DEBIAN
aspect::point::functions
Aspect::Point::Functions(3pm) User Contributed Perl Documentation Aspect::Point::Functions(3pm)NAME
Aspect::Point::Functions - Allow point context methods to be called as functions
SYNOPSIS
use Aspect::Point::Functions;
# This code is equivalent to the SYNOPSIS for Aspect::Point
my $advice_code = sub {
print type; # The advice type ('before')
print pointcut; # The matching pointcut ($pointcut)
print enclosing; # Access cflow pointcut advice context
print sub_name; # The full package_name::sub_name
print package_name; # The package name ('Person')
print short_name; # The sub name (a get or set method)
print self; # 1st parameter to the matching sub
print (args)[1]; # 2nd parameter to the matching sub
original->( x => 3 ); # Call matched sub independently
return_value(4) # Set the return value
};
DESCRIPTION
In the AspectJ toolkit for Java which Aspect is inspired by, the join point context information is retrieved through certain keywords.
In Aspect this initially proved too difficult to achieve without heavy source code rewriting, and so an alternative approach was taken
using a topic object and methods.
This experimental package attempts to implement the original function/keyword style of call.
It is considered unsupported at this time.
AUTHORS
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2011 Adam Kennedy.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-01 Aspect::Point::Functions(3pm)