in reply to regexps and hashes

Also note that since you put everything into a hash and then extract it, the order your script outputs will most likely NOT be the same as the order in the original file. Try something like this to smooth things out:
while (<FILEDATA>) { /$TTITLE(\d+)=(.+)$/ and print "$1-$2\n"; }
or if you need to save them for later use:
while (<FILEDATA>) { /$TTITLE(\d+)=(.+)$/ and push(@titles, "$1=$2\n"); } ## Then just: print @titles;

These ways also allow more than one TTITLE of the same number to exist, if that's a factor. A hash will only save the value of the last one read.