Hello,
I am trying to output the values in an array to a file. The output needs to be formated such that each array value is left jusified in a field 8 character spaces long. Also, no more than 6 fields on a line. For example:
@array= 1..14;
Needs to be output to the file like so:
1 ... (4 Replies)
Hello everybody, I'm new in this forum.
I searched a long time for a solution for my problem but I didn't find the right thing.
I have to read from a file (content is "abngjm" without any other signs) and have to write this content in an array. But every sign has to be called by its own... (5 Replies)
Hi,
Is there any way I can grep an array against another array?
Basically here's what I need to do.
There will be an array containing some fixed texts and I have to check whether some files contain these lines. Reading the same files over and over again for each different pattern doesnt seem... (1 Reply)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Iam trying to load the full path of multiplie files in the same directory to an array if the filenames matches a pattern. The following is the current code;
where $input=C:\test
# change to and open the comparison directory
chdir("$input2") || die "Cannot change dir: $!";
opendir(DIR2,... (2 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Hello Guru's
I want to read an array into a flatfile
Please let me know how to do the same
So far this the below code
use strict;
use warnings;
open (my $data , '<', $ARGV)|| die "could not open $ARGV:\n$!";
my @array=(<$data>);
my @sorted=sort... (8 Replies)
I wrote a simply perl that searched a file for a particualr value and if it found it, rite it and the next three lines to a file. Now I have been asked to check those next three lines for a different value and only write those lines if it finds the second value.
I was thinking the best way to... (1 Reply)
ok, so here is the issue, I have 2 arrays.
I need to be able to create a loop that will find ${ARRAY1 in the text doc, and replace it with ${ARRAY2 then write the results. I already have that working. The problem is, I need it to do that same result across however many items are in the 2... (2 Replies)
Discussion started by: gentlefury
2 Replies
LEARN ABOUT DEBIAN
perl::critic::statistics
Perl::Critic::Statistics(3pm) User Contributed Perl Documentation Perl::Critic::Statistics(3pm)NAME
Perl::Critic::Statistics - Compile stats on Perl::Critic violations.
DESCRIPTION
This class accumulates statistics on Perl::Critic violations across one or more files. NOTE: This class is experimental and subject to
change.
INTERFACE SUPPORT
This is considered to be a non-public class. Its interface is subject to change without notice.
METHODS
"new()"
Create a new instance of Perl::Critic::Statistics. No arguments are supported at this time.
" accumulate( $doc, @violations ) "
Accumulates statistics about the $doc and the @violations that were found.
"modules()"
The number of chunks of code (usually files) that have been analyzed.
"subs()"
The total number of subroutines analyzed by this Critic.
"statements()"
The total number of statements analyzed by this Critic.
"lines()"
The total number of lines of code analyzed by this Critic.
"lines_of_blank()"
The total number of blank lines analyzed by this Critic. This includes only blank lines in code, not POD or data.
"lines_of_comment()"
The total number of comment lines analyzed by this Critic. This includes only lines whose first non-whitespace character is "#".
"lines_of_data()"
The total number of lines of data section analyzed by this Critic, not counting the "__END__" or "__DATA__" line. POD in a data section
is counted as POD, not data.
"lines_of_perl()"
The total number of lines of Perl code analyzed by this Critic. Perl appearing in the data section is not counted.
"lines_of_pod()"
The total number of lines of POD analyzed by this Critic. Pod occurring in a data section is counted as POD, not as data.
"violations_by_severity()"
The number of violations of each severity found by this Critic as a reference to a hash keyed by severity.
"violations_by_policy()"
The number of violations of each policy found by this Critic as a reference to a hash keyed by full policy name.
"total_violations()"
The the total number of violations found by this Critic.
"statements_other_than_subs()"
The total number of statements minus the number of subroutines. Useful because a subroutine is considered a statement by PPI.
"average_sub_mccabe()"
The average McCabe score of all scanned subroutines.
"violations_per_file()"
The total violations divided by the number of modules.
"violations_per_statement()"
The total violations divided by the number statements minus subroutines.
"violations_per_line_of_code()"
The total violations divided by the lines of code.
AUTHOR
Elliot Shank "<perl@galumph.com>"
COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank.
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.14.2 2012-06-07 Perl::Critic::Statistics(3pm)