For example, if you happen to be using unix/x-windows, and the perl script is providing some convenient controls on file selection, then a nice work-around within your perl script could be:
That fires up a fresh xterm running as a background job (control returns to the perl script while the xterm stays up); the xterm is running a command where the output of zcat is being fed to "less" (not more); when the user hits "q" or some other means for quitting less, the xterm goes away, but until then, the user can browse the file contents indefinitely, and continue using the perl script to bring up more files in other windows, as needed. I use this strategy a lot.... system( "xterm -e 'zcat $file | less' &" ); ...
I expect there's a way to do the same thing with ms-windows -- i.e. without x-windows/xterm -- assuming you have ms-win versions of a unix-like shell and the command line tools involved.
In reply to Re: Open a Compressed File and Piping to More
by graff
in thread Open a Compressed File and Piping to More
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |