#!/usr/bin/perl -lw use strict; my $x=" balhblahblahblah asdfasdfasdfasd "; $x=~s/<(.+?)>/<\U$1\E>/g; print $x;