Not sure I understand your question
(also you didn't specify your target OS and printing system)
, but I find the KDE
kprinter
program handy. It pops up a dialog where you can choose from different
printers / printing systems etc. Just run it instead of LPR (one tip:
use
kprinter --stdin if you want to send data by piping instead
of temporary files as arguments).
Unix: you can always parse /etc/printcap (the Printer module may do it for you, the docs says it does have a list_printers method)
Windows: One quick search on CPAN yields Win32::Printer::Enum, a module that
enumerates Windows printers, though I can't recommend it because I never used it.