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)
In Perl I can write a condition that evaluates a match expression like this:
if ($foo =~ /^bar/) {
do blah blah blah
}
How do I write this in shell? What I need to know is what operator do I use? The '=~' doesn't seem to fit. I've tried different operators, I browsed the man page for... (3 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)
I have to do grep -v in a perl script. I want to exclude blank lines and lines having visitor.
#grep -v visitor abc.txt |grep '.'
file:abc.txt
1340 not booked 16D:D9 tourist 8
1341 not booked 16C:D4 tourist 25
1342 not booked 16D:C4 visitor 7
1343 not booked 01C:D9 visitor 6
1344... (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)
Perl::Critic::Policy::TestingAndDebugging::RequireUseStrUser3Contributed Perl DocumePerl::Critic::Policy::TestingAndDebugging::RequireUseStrict(3)NAME
Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict - Always "use strict".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Using strictures is probably the single most effective way to improve the quality of your code. This policy requires that the 'use strict'
statement must come before any other statements except "package", "require", and other "use" statements. Thus, all the code in the entire
package will be affected.
There are special exemptions for Moose, Moose::Role, and Moose::Util::TypeConstraints because they enforces strictness; e.g. 'use Moose'
is treated as equivalent to 'use strict'.
The maximum number of violations per document for this policy defaults to 1.
CONFIGURATION
If you take make use of things like Moose::Exporter, you can create your own modules that import the strict pragma into the code that is
"use"ing them. There is an option to add to the default set of pragmata and modules in your .perlcriticrc: "equivalent_modules".
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = MooseX::My::Sugar
SEE ALSO
Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module
perl v5.16.3 2014-06-09 Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict(3)