Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach my $p (@ARGV) {
- my $date = time;
- open(F, "<", "$p/data/System/$p.txt") || die "Could not open $p for read";
- my @lines;
- while (my $l = <F>) {
- chomp($l);
- if ( $l =~ /^%META:(TOPICINFO|FILEATTACHMENT){(.*)}%$/ ) {
- $l =~ s/date=\"\d+\"/date="$date"/;
- }
- push(@lines, $l);
- }
- close(F);
- open(F, ">", "$p/data/System/$p.txt") || die "Could not open $p for write";
- print F join("\n", @lines);
- close(F);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement