My first instinct is that
plink isn't the best way to go about this and that it'd be better to use a standard module (perhaps
Net::SSH::Perl) to log in to your Linux box instead. Then, proceed as
zentara suggested: trap
SIGINT, and perform the appropriate cleanup in the signal handler routine, closing the connection gracefully etc.