I'd manage a shell script that:
- installed the rpm
- called a separate Perl utility to deal with the DB
- run a separate shell script interactively (see below)
- run the 2nd Perl utility, though with proper error checking your external utils should simply fail or succeed
Dealing with an interactive shell script inside using another shell script looks like:
#!/bin/sh
sh ./interactive.sh <<END
input string 1
input string 2
...
END
I would not wrap this into the one Perl script to rule them allz. Utilize the shell script interface and piping/redirect facilities provided by the *nix environment. |