David Vergin wrote:
system(qq/echo -en "$data_str" | lpr -oraw/);
That does not work in cygwin.
Lasse wrote:
Why would want use echo for this? Just use a piped open directly to lpr:
open(FH, '| lpr -oraw');
print(FH, $data_str);
close(FH);
Thank you Lasse.
This is seriousl
Igor Pechtchanski wrote:
[SNIP]
(parens are optional,
Not in the coding guidelines at work... :-)
but the main thing is that there can't be a comma
after FH in the print statement).
Oops, yes that's correct... :-)
--
/Lasse
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-sim
>
> $ echo -en "hello\nworld"
> hello
> world
> [EMAIL PROTECTED] /c/bin
> $ #Good! The basic approach works on the command line.
>#Control codes are interpreted and no trailing newline.
>#So I'll try the same thing from perl letting the echo
># command convert the cont
On Fri, 1 Jul 2005, Lasse wrote:
> David Vergin wrote:
> > I'm adapting a working linux program to cygwin. The process has been
> > relatively painless except for this issue which has delayed me way
> > past deadline.
> >
> > I need to output text and printer codes (which may include \000) from
>
David Vergin wrote:
> system(qq/echo -en "$data_str" | lpr -oraw/);
> ...or whatever
>From a security standpoint, this is horrific. Passing user-supplied
data on the command line to a system command is just a recipe for
disaster. I don't understand why you need to use 'echo' to do you
David Vergin wrote:
I'm adapting a working linux program to cygwin. The process has been
relatively painless except for this issue which has delayed me way past
deadline.
I need to output text and printer codes (which may include \000) from a
perl program to a printer which may be on a parall
I'm adapting a working linux program to cygwin. The process has been
relatively painless except for this issue which has delayed me way past
deadline.
I need to output text and printer codes (which may include \000) from a
perl program to a printer which may be on a parallel port or a USB port
7 matches
Mail list logo