[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] system("perl -e..."); #!!



On Tue, Jul 13, 1999 at 03:21:52PM -0300, Rodrigo Bernardo Pimentel wrote:
> 	Yes, I admit it, I did that... No flogging, please...
> 	The reason I did that was I need to output a lot of text and make
> it scrollable; so I used system("perl -e '.....' |less").
> 	Is there a way to do this more... Well... Ellegantly? A module, or
> something? I couldn't find anything that did quite what I wanted...
> 

Something like this?


$SIG{PIPE} = 'IGNORE';

open(LESS, '|less') or die "Error opening pipe to less: $!\n";

print LESS "whatever\n";

close(LESS) or die "Error closing pipe to less: $!\n";



Ronald

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe