--- [EMAIL PROTECTED] wrote:
>
>
> All,
> I 've an output from the system comand as follows.
>
> * /xxx/aaaa /yyy/bbbb
> * /www/cccc /vvv/dddd
> * /uuu/eeee /ttt/ffff
> : : :
>
> I want to parse this output into an array and split them and
> process each entry. Essentially, I want to parse the output of a
> command to an array and process each entry in the array.
>
> My code is
>
> my @vob_list = system ("cleartool lsvob") ;
This isn't how system() works.
You need to either use
my @vob_list = `cleartool lsvob`; # works, but might get kludgy
or, more to my preference,
open VOB, "cleartool lsvob|" or die $!; # opens a pipe
then alter this:
> foreach $entry (@vob_list) {
to this:
while(my $entry=<VOB>) {
> print " This is first '$entry'" ;
> }
The final result:
open VOB, "cleartool lsvob|" or die $!; # opens a pipe
while(my $entry=<VOB>) {
print " This is first '$entry'" ;
}
> I am a beginner, so bear with me if there are blunders.
No problem. =o)
> Thanks in advance for any help.
> Kailash
You're welcome.
Paul
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/