Hi,
   
  Hope this is what you are expecting.
   
  #!/usr/bin/perl -w
  ($old_header,$old_atoms,$old_bonds) = mol2_read('prabu');
print "@{$old_header} \n @{$old_atoms} \n @{$old_bonds}";
sub mol2_read {
    @mol2_header = ('prabu1','prabu12');
    @mol2_atoms = ('prabu2');
    @mol2_bonds = ('prabu3');
    return ([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]);
}
  
[EMAIL PROTECTED]
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
  Hi everybody,

I got a problem with handling sub-routines and arrays.

Here is an example of the code:

#!/usr/bin/perl -w

(@old_header,@old_atoms,@old_bonds) = mol2_read($opts{m});

sub mol2_read {
return ([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]);
}

Ok, now the problem:
If I want to print the elements of the arrays @old_header, @old_atoms
and @old_bonds i see, that all arrays, that come from the sub
mol2_read are stored in only one array; in @old_header.

I want to know, how it would be possible to store every @mol-array in
the right @old-array?

Thanks for your help

Best regards

German


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






 
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

Reply via email to