in reply to Regex with -

This should work:
$aliases{$1} = $2 if $input =~ /^ca\s(\w+)->(\w+)$/;