In case anybody wanted to know.. I figured it out..  used a while loop instead.
sub OnEval{
# get the text from PegText
# and set a var by catinating the peg command with the contents of PegText
    my $widget = $OutputText->Subwidget("text");
    tie *STDOUT, ref $widget, $widget;
    my $loop_check= 0;
    my $counter=1;
    # PegText defined as the text widget
   #  $rmhost->login($username, $passwd);  
        while ($loop_check == 0)
        {
        my $peg=$PegText->get($counter . '.0', $counter . '.0 lineend');
        $counter++;  
     #   chomp($peg);
         if ( $peg == "")
         {$loop_check++}
         {
            if ( !($peg == ""))
                   {
                        my $peg_command="peg " . $peg . " ./data/journal/* > 
./data/chopler";         
                        print "\n";
                        print'command used:[';
                        print $peg;  
                        print "]";  
                        print "\n";       
                        print'command used:';
                        print $peg_command;  
                        print "\n";
                        #$rmhost->cmd($peg_command);     
 
                };
                };
        };
   # $rmhost->close; 
    print"DONE";
}
>>> "Steve Lobach" <[EMAIL PROTECTED]> 02/19/03 02:11PM >>>

I am trying to read in a text widget line by line: 
        my $peg1=$PegText->get('1.0', '1.0 lineend');
        my $peg2=$PegText->get('2.0', '2.0 lineend');

the problem is I want to do it dynamically, because I don't know how may I will have 
in the future.. I read about the following method, 
        my @lines = $PegText->get($PegText->tagRanges($tag));
but I don't know how to define $tag... any help?  Thanks, steve.



--
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to