in reply to Value Fill

The functionality which you seek is provided by the Expect module. For example:

use Expect; my $process = Expect->spawn( '/usr/bin/passwd'); $process->expect( 10, "Password:" ); $process->send( "changeme\n" ); $process->send( "newpass\n" ); $process->send( "newpass\n" ); $process->expect( undef );

Alternatively, if you find the interface to this module overly complex, you may want to investigate the Expect::Simple module.

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001000000100"))'