in reply to regex with comparing
That being said, you're probably going to get a whole ton of warnings. For instance, you're trying to use a string as an array reference. There's a comment with no comment prefix.#!/usr/bin/perl -w use strict; # (More program ...)
This makes an array of arrays (AoA). You can read this like you expect with the rest of your code. If you want to put this in a hash, like you've suggested, thus making a hash of array of arrays (HoAoA), try using this in the loop:open(CHANGED, "changed.txt") || die "Can't open change log\n"; my @changes = map { chomp; [ split('-', $_) ] } <CHANGED>; close(CHANGED);
$changes{$file} = \@changes;Now that you've got the data, the rest should be a lot easier.
|
|---|