I use emacs/gnus as my newsreader.
In gnus you can select msgs and then run shell cmds on that selected
content.
I want to know how to take user input during that action.
That is, I run a perl script against the selected content. When that
script first starts to process the piped content I want to be queried
for some specific input.
my $value = <STDIN>;
Is the way I do that when running a perl script from the command
line.
But that just gets ran over when I try that from within gnus.
I think because STDIN is alread full of the piped input.
below is a lamer example:
Select some text from within gnus
Feed that text to this program
But of course it just gets ran over
#!/usr/bin/perl
use strict;
use warnings;
## Before we start, take input from user
print "words?: > ";
my $keyw = <STDIN>;
while(<>) {
if ($. == 1) {
print "$keyw"
print;
}else {
print;
}
}
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/