Re: Pipe inside perl one liner

2007-02-11 Thread Peter Scott
On Sun, 11 Feb 2007 00:38:02 +, vjp2 wrote: I wonder if it is possibl to merge these two perl one liners inside one perl one liners, by putting the pipe statement inside? speach () { cat $1 | perl -n00e'tr/\t\r\n/ /s; print qq($1\n) while s/^(.{0,36}\S)\s+//;print qq(\n)' | perl -pe 'if

Re: pipe in perl ???

2003-01-15 Thread John W. Krahn
Martin A. Hansen wrote: hi Hello, how to use an array as input for a external command called within a perl script? im looking to pipe the array to the extarnal program ... open PIPE, '| somecommand' or die Cannot open pipe to somecommand: $!; print PIPE @array; close PIPE or die Cannot

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 05:34:59AM -0800, John W. Krahn wrote: Martin A. Hansen wrote: hi Hello, hi again how to use an array as input for a external command called within a perl script? im looking to pipe the array to the extarnal program ... open PIPE, '| somecommand' or

Re: pipe in perl ???

2003-01-15 Thread wiggins
Sorry if I already missed a post where you said you couldn't (have had the flu), but could you use one of the various modules in CPAN to control gnuplot instead of trying to manipulate it yourself? A quick search: http://search.cpan.org/search?query=Gnuplotmode=all

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 08:27:13AM -0600, [EMAIL PROTECTED] wrote: Sorry if I already missed a post where you said you couldn't (have had the flu), but could you use one of the various modules in CPAN to control gnuplot instead of trying to manipulate it yourself? hi i did look at it, but i

RE: pipe in perl ???

2003-01-15 Thread Bob Showalter
[EMAIL PROTECTED] wrote: i need to translate the following commandline to perl: (echo set term post; echo plot '-' w l; cat data) | gnuplot data.ps open(F, | gnuplot data.ps) or die $!; print F set term post\n, plot '-' w l\n; print $_\n for @commands; close F or die $!; --

RE: pipe in perl ???

2003-01-15 Thread Bob Showalter
Bob Showalter wrote: [EMAIL PROTECTED] wrote: i need to translate the following commandline to perl: (echo set term post; echo plot '-' w l; cat data) | gnuplot data.ps open(F, | gnuplot data.ps) or die $!; print F set term post\n, plot '-' w l\n; print $_\n for @commands;

Re: pipe in perl ???

2003-01-15 Thread Martin A. Hansen
On Wed, Jan 15, 2003 at 10:33:45AM -0500, Bob Showalter wrote: Bob Showalter wrote: [EMAIL PROTECTED] wrote: i need to translate the following commandline to perl: (echo set term post; echo plot '-' w l; cat data) | gnuplot data.ps open(F, | gnuplot data.ps) or die $!;