On Sun, 29 Nov 2009 23:39:58 +1000, Huub van Niekerk
<huubvanniek...@gmail.com> wrote:
open my $LPR, '|-', qw/lpr -PDeskJet940C/ or die "can't fork lpr: $!";
$ENV{"PATH"} = "";
at the start of the script, it doesn't seem to complain any more.
Hope that helps,
Thank you, though I'm not out of problems yet. The message I'm getting
now is:
Can't exec "lpr": No such file or directory at <same line>
Is that $ENV path maybe incorrect?
Try specifying the full path for lpr
%whereis lpr
lpr: /usr/bin/lpr.cups /usr/bin/lpr /usr/share/man/man1/lpr.1.gz
So on my box, /usr/bin/lpr
If you look at that article I sent you previously, it gives some
explanation for why you need to reset $ENV{"PATH"} (from memory).
HTH,
Dave
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/