Can this "redmon" program be run in a command line shell, and does it allow you to redirect printer driver output to its own stdout? (Alternatively, can it simply save the printer driver output to a file?)

The point would be to avoid using redmon's own internal method for invoking your perl program. Have it write or save its output in some "normal" way so that your perl program (running on its own in a command line shell) can read it.

Update: To check whether its an environment issue, you could add this to your perl script, before the DBI connect call:

open( E, ">", "check-env-$$.txt" ); # adjust path to suit your taste print E "$_ => $ENV{$_}\n" for ( sort keys %ENV ); close E;
Then compare the two versions of the check-env file (the one when run from the command line, the other when run from redmon).

Another update: If redmon can be run as a command-line tool, and can write its output to stdout, you could turn the tables: have your perl script run redmon, rather than the other way around:

open( RED, "-|", "redmon arg1 ..." ) or die "redmon failed: $!"; while (<RED>) { # do stuff... print; }

In reply to Re: DBI madness by graff
in thread DBI madness by rsilvergun

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.