s{...}{ c2f($1).'/'.c2f($2) }ge; sub c2f { my $celsius = shift; return (9 *{$celsius}/5) + 32; }