<commit_before>#!/usr/bin/perl -w

# Script to illustrate how to parse a simple XML file
# and dump its contents in a Perl hash record.

use strict;
use XML::Simple;
use Data::Dumper;

my $booklist = XMLin('booklist.xml');

print Dumper($booklist);<commit_msg>command line arg for file name<commit_after>#!/usr/bin/perl -w

# Script to illustrate how to parse a simple XML file
# and dump its contents in a Perl hash record.

use strict;
use XML::Simple;
use Data::Dumper;

# check for the correct number of command-line args
if (($#ARGV + 1) != 1) {
    print "\nUsage: xmlsimpleRead.pl repoRecordFile_name\n";
    exit;
}

my $booklist = XMLin($ARGV[0]);

print Dumper($booklist);
{'fraction_non_alphanumeric': 0.1217008797653959, 'fraction_numerical': 0.004398826979472141, 'mean_word_length': 4.3359375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1172051', 'n_tokens_mistral': 237, 'n_tokens_neox': 226, 'n_words': 85}