tom arnall wrote: > the following script is intended to uppercase every character preceded by > [?.] > and one or two spaces: > > ($f,$g)=/([?.] {1,2})([a-z])/s; > $h = uc $g; > s/$f$g/$f$h/s; > > in the third line however perl interprets the [.?] in $f as a metacharacter. > is there any way to get perl to interpret the contents of $f as a literal? or > is there another way entirely to accomplish the same goal?
s/([?.] {1,2})([a-z])/$1\U$2/; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>