<commit_before>#!perl -w
# Copyright (C) 2010, Parrot Foundation.
# $Id$
#
# perl script that deliver all filenames and the associated chapters
#

use Getopt::Long ();

my $item_list_ref = [ ['intro.pod', 'Introduction to Parrot'],
                      ['overview.pod', 'Overview'],
                    ];

my $lang = @$item_list_ref;

my ( $result, $give_out, $b_out);

$result = Getopt::Long::GetOptions (
	"print" => \$give_out,
	"b_out" => \$b_out,
);

if ($give_out)  {
	for ( my $i=0; $i<$lang; $i++ )
		{ print $$item_list_ref[$i][0], ' ' }
	exit;
};

if ($b_out) {
	for ( my $i=0; $i<$lang; $i++ )
		{ print 'build/modified_pod/', $$item_list_ref[$i][0], ' ' }
	exit;
};


for (my $i=0; $i<$lang; $i++)
	{ `sed -e '4,6c\=head0 $$item_list_ref[$i][1]' $$item_list_ref[$i][0] > build/modified_pod/$$item_list_ref[$i][0]` }



<commit_msg>fix perlcritic failures - shebang line, use strict/warnings, add coda and remove hard tabs<commit_after>#! perl
# Copyright (C) 2010, Parrot Foundation.
# $Id$
#
# perl script that deliver all filenames and the associated chapters
#

use strict;
use warnings;

use Getopt::Long ();

my $item_list_ref = [ ['intro.pod', 'Introduction to Parrot'],
                      ['overview.pod', 'Overview'],
                    ];

my $lang = @$item_list_ref;

my ( $result, $give_out, $b_out);

$result = Getopt::Long::GetOptions (
    "print" => \$give_out,
    "b_out" => \$b_out,
);

if ($give_out)  {
    for ( my $i=0; $i<$lang; $i++ )
        { print $$item_list_ref[$i][0], ' ' }
    exit;
};

if ($b_out) {
    for ( my $i=0; $i<$lang; $i++ )
        { print 'build/modified_pod/', $$item_list_ref[$i][0], ' ' }
    exit;
};


for (my $i=0; $i<$lang; $i++)
    { `sed -e '4,6c\=head0 $$item_list_ref[$i][1]' $$item_list_ref[$i][0] > build/modified_pod/$$item_list_ref[$i][0]` }


# Local Variables:
#   mode: cperl
#   cperl-indent-level: 4
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4:

{'fraction_non_alphanumeric': 0.2109053497942387, 'fraction_numerical': 0.01800411522633745, 'mean_word_length': 3.3126385809312637, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '910582', 'n_tokens_mistral': 838, 'n_tokens_neox': 790, 'n_words': 174}