$format_string =~ s/%(\w)/eval "$$1"/ge;
In reply to Re: Format string and regex question by dws in thread Format string and regex question by r.joseph