んじゃ単純に♪
$time =~ s{BE:(\d+)-(.+)$}{<a href="javascript:be($1);">?$2</a>};

ところで「?」ってなあに?