in reply to parsing out alias string better in perl to .htm

Simple solutions are probably just a regular expression:
$varalias =~ s/=.*//; # Delete everything(.*) from the equals on $vartarget =~ s/"$//; # Delete the quote at the end($)
As a note, your regular expression scares the willies out of me, a strong case for Death to Dot Star!. You probably mean to do something like this:
# If able to delete the stuff(.*) between the beginning # of the line(^) and the word 'alias' and one-or-more spaces(\s+) # found after that ... if (s/^.*?alias\s+//) { # Extract the 1st, 5th and 7th "words" my ($varalias, $varsource, $vartarget) = (split(' '))[1,5,7]; # Then whatever... }
Here's a few general tips which can help you simplify your program.

Your print to OUT just screams out for a "here document" style approach, where you can put a whole bunch of stuff right in your program and save yourself having to quote it properly. As a bonus, you don't have to "escape" your quote marks, like you have done:
print OUT <<END_HTML; <FOO> <FOO>$varsource <FOO> <FOO>$vartarget <FOO> <FOO> END_HTML
Also, you can increment a variable with the ++ operator, like so: $i++ and that is the same as $i = $i + 1 but is much shorter.

Don't forget to indent, either. Not indenting is a major Faux Pas, kind of like arrivng at work without a shirt on. You can do it, but people look at you funny. Whenever you open braces, kick it in a tab stop. Some editors can do this for you automatically, if you're feeling Lazy. Example:
if ($something) { some_code(); if ($something_else) { some_other_code(); } }