Hi
I need an equivalent command in PERL for the following.
export LC_ALL=C;
I hope this is the command. Please confirm this and correct me if i am wrong
$ENV{LC_ALL}="C";
Thanks and Regards
Ammu (1 Reply)
Guess the subject lines says it all.
What is the perl equivalent to grep -c
-c, --count
Suppress normal output; instead print a count of match-
ing lines for each input file. With the -v, --invert-
match option (see below), count non-matching lines.
... (6 Replies)
Dear All,
Good day, can any of you help me in the following problem:
I need to find the perl equivalent for the following commandline
grep characters |awk '{print \$2}'Expecting your reply and thanks in advance.
Warm regards
Fredrick. (4 Replies)
Hello,
I searched online; it seems that perl use $NR as NR in awk; however it does not work for me. For example, how to re-write the following awk using perl:
awk '{ print NR}' inputfile---------- Post updated at 01:55 PM ---------- Previous update was at 12:49 PM ----------
I found... (2 Replies)
hi Geeks,
my input file contains data like =>
53 - Deewana Kar Raha Hai.mp3
54 - Hale Dil.mp3
55 - Ishq Sufiyana.mp3
56 - Abhi Kuch Dino Se.mp3
57 - Pee Loon Hoto Ki Sargam.mp3
I had used sed command to remove the prefix from the file name like
sed 's/^\
it gives me the perfect... (4 Replies)
Ive been trying to move to Perl. It has been a struggle.
My question is, is there a good resource that explains nesting statements.
As an example.
To change
primary
Factory CTS 1.9.0(46) P1
*Slot 1 CTS 1.10.2(42) P1
To
primary *Slot 1 CTS 1.10.2(42) P1
... (5 Replies)
Need grep -v "Hello" equivalent for AIX (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT REDHAT
data::grove::visitor
Data::Grove::Visitor(3) User Contributed Perl Documentation Data::Grove::Visitor(3)NAME
Data::Grove::Visitor - add visitor/callback methods to Data::Grove objects
SYNOPSIS
use Data::Grove::Visitor;
@results = $object->accept ($visitor, ...);
@results = $object->accept_name ($visitor, ...);
@results = $object->children_accept ($visitor, ...);
@results = $object->children_accept_name ($visitor, ...);
DESCRIPTION
Data::Grove::Visitor adds visitor methods (callbacks) to Data::Grove objects. A ``visitor'' is a class (a package) you write that has
methods (subs) corresponding to the objects in the classes being visited. You use the visitor methods by creating an instance of your vis-
itor class, and then calling `"accept($my_visitor)"' on the top-most object you want to visit, that object will in turn call your visitor
back with `"visit_OBJECT"', where OBJECT is the type of object.
There are several forms of `"accept"'. Simply calling `"accept"' calls your package back using the object type of the object you are vis-
iting. Calling `"accept_name"' on an element object calls you back with `"visit_name_NAME"' where NAME is the tag name of the element, on
all other objects it's as if you called `"accept"'.
All of the forms of `"accept"' return a concatenated list of the result of all `"visit"' methods.
`"children_accept"' calls `"accept"' on each of the children of the element. This is generally used in element callbacks to recurse down
into the element's children, you don't need to get the element's contents and call `"accept"' on each item. `"children_accept_name"' does
the same but calling `"accept_name"' on each of the children. `"attr_accept"' calls `"accept"' on each of the objects in the named
attribute.
Refer to the documentation of the classes you are visiting (XML::Grove, etc.) for the type names (`"element"', `"document"', etc.) of the
objects it implements.
RESERVED NAMES
The hash keys `"Contents"' and `"Name"' are used to indicate objects with children (for `"children_accept"') and named objects (for
`"accept_name"').
NOTES
These are random ideas that haven't been implemented yet:
o Several objects fall into subclasses, or you may want to be able to subclass a visited object and still be able to tell the difference.
In SGML::Grove I had used the package name in the callback (`"visit_SGML_Element"') instead of a generic name (`"visit_element"'). The
idea here would be to try calling `"visit_PACKAGE"' with the most specific class first, then try superclasses, and lastly to try the
generic.
AUTHOR
Ken MacLeod, ken@bitsko.slc.ut.us
SEE ALSO perl(1), Data::Grove
Extensible Markup Language (XML) <http://www.w3c.org/XML>
perl v5.8.0 2000-02-22 Data::Grove::Visitor(3)