Hi,

I could use open(STDOUT,"| more") option to more big file.
After this, I close STDOUT as if I do not close, readline prints the
prompt even when more is not 100%.

#######################################
open(STDOUT,"| more") || "Cannot open stdout for more $!";
$status = system("cat report.txt");
$status = system("clear");
close STDOUT;
## If I do not close handler then I get the prompt(see below) on ## the
very first page of the screen. I need to ask this once 
# more is done with 100% display of file. Actually, before #deletion I
want to show the data to user and then ask about his #consent for deletion.

$term = new Term::ReadLine '999';
$prompt = "All the rows displayed above will be removed\nDo you want to
continue?(Y/N) :";

$option = $term->readline($prompt);

######################################
Now if i try to print the option. I do not get anything even if user says
'y'. Looks like if i close STDOUT, readline does not read.

Any pointers will be appreciated.
Thanks,

Raminder



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to