andyarp has asked for the
wisdom of the Perl Monks concerning the following question:

So, i'm trying to use perl to write a script to automate a process that controls bitlocker drive encryption pins. I've written a script that takes the computername (format xxxx-xxxxxxxxxx) and takes the last 4 digits of the name and inputs those digits to a variable ($pin). Then, it runs command

system "manage-bde -changepin C: -computername $asset";

It then pops up asking what you want the pin to set to. My question is, how can i take the 4 digit number in the variable $pin i mentioned and have perl automatically type them into the prompt that manage-bde pops up with?

I'm unfamiliar with manage-bde.
When you said "It then pops up asking ...", I thought it sounded like a GUI;
however, in the next sentence, you write "... automatically type them into the prompt ...",
which sounds less like a GUI, and more like 'enter a value when prompted'.
Some clarification on this would help.

There's potentially a few ways you could do this. Here's some examples: