http://www.perlmonks.org?node_id=423523


in reply to CLI must not echo password

Another alternative is IO::Prompt:
use IO::Prompt; $pwd = prompt "enter password: ", -echo=>"";
or, better still, echo the password with stars:
use IO::Prompt; $pwd = prompt "enter password: ", -echo=>"*";