in reply to add a character at the end of a string

I tried little bit here,
$string.="/" if(not $string =~/\/$/ );

kulls