<commit_before># Perl Notes

use strict;
use warnings;

# opening a file from argument
open ( FILE1, $ARGV[0] ) || die "Input error.\n";
close FILE1;

# append to file
open ( FILE2, "> out.txt" );
my $name = "Fred";
print FILE2 $name; 
close FILE2;

# functions/subroutines
sub fun1 {
    print 1, "\n";
}
&fun1(); # invoke subroutine

# sample array
my @array1;
$a[0] = 1;
$a[1] = 2;
$a[2] = 4;<commit_msg>Add Perl note on conditional statement<commit_after># Perl Notes

use strict;
use warnings;

# opening a file from argument
open ( FILE1, $ARGV[0] ) || die "Input error.\n";
close FILE1;

# append to file
open ( FILE2, "> out.txt" );
my $name = "Fred";
print FILE2 $name; 
close FILE2;

# functions/subroutines
sub fun1 {
    print 1, "\n";
}
&fun1(); # invoke subroutine

# sample array
my @array1;
$a[0] = 1;
$a[1] = 2;
$a[2] = 4;

# conditional statement
if ($a[2] == 0) {
    print "Matched!\n";
}
{'fraction_non_alphanumeric': 0.17070484581497797, 'fraction_numerical': 0.037444933920704845, 'mean_word_length': 3.7591623036649215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '990940', 'n_tokens_mistral': 381, 'n_tokens_neox': 359, 'n_words': 117}