in reply to regex substitution

Umm, why not just use variable interpolation?
foreach (0..@ChildName - 1) { my $text = "Your child $ChildName[$_] is invited to come to our school. Your child's teacher will be $TeacherName[$_], and the class is held in room $RoomNo[$_]."; &PrintNotice($text) # or whatever... }

Replies are listed 'Best First'.
Re: Re: regex substitution
by michellem (Friar) on Nov 05, 2001 at 18:13 UTC
    Because this isn't within a script - I'm basically allowing users to create their own paragraph-like ouput of database rows. I wanted to have the combination of ease of use for non-savvy users, and ease of me translating the text into the right thing. I might convert to using <> instead of ##. ## is kinda useful because it's the way that some (like Cold Fusion) user-friendly systems use for variables.