All the text in this area ... --#-- The <textarea> input field is slightly different, but still an easy fix. There is one small requirement in this code: the HTML form must contain a closing </textarea> tag. The code can probably be modified to work around that requirement, but I haven't done it yet.

@tas = getTextAreas($html_file); foreach (@tas) { $val = $query->param($_); $html_file =~ s/(]*name="?$_[^>]*>)([\w\-\s]*)(<\/textarea>)/$1$val$3/is; } sub getTextAreas { my($html) = @_; my @t = (); my @areas = split(/