I have this subroutine which works pretty well for one value, but I need to be able to 
parse the input text box ($PegText) so I can loop over the entry's..
I assume I can use $PegText->get($index1,$index2); I just don't know how to use it.. 
how does the setup the initial $index2 to look for the delimeters newlines and commas 
and how to get the next line etc.. 


sub OnEval{
# subroutine to peg (perl grep utility) and display contents.
    my $widget = $OutputText->Subwidget("text");
    tie *STDOUT, ref $widget, $widget;
        my $peg2=$PegText->get(0.1, 'end');
        chomp($peg2);
        my $peg_command="peg " . $peg2 . " ./data/journal/* > ./data/chopler";
        my $cat_command='cat ./data/chopler';
        my $mv_command='mv ./data/chopler ./data1/chopler.dat';
        my @lines="";
        my $sjl="";
        $rmhost->login($username, $passwd);   
         @lines =$rmhost->cmd($peg_command);   
         @lines=$rmhost->cmd($cat_command);
         $OutputText->delete(0.1, 'end');
         print"\n";
         print'command used:';
         print $peg_command;  
         print"\n";
         print'found in :';              
         $sjl= \@lines;
         print $sjl;
         print"\n";
         $rmhost->close;   
}





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

Reply via email to