You're passing a reference, and using it in the subroutine as though it 
was the array itself.


&format_docpp_comment (\@Array);

sub format_docpp_comment {
  my $Strings = shift;

  foreach my $String (@{$Strings}) {
   < do stuff >
  }
}

Ought to work

The Hooker



> My problem is that for some reason when I print out the variable 
> $single_comment_line, rather than getting a very long string, I get 
> something like: 
> 
> ARRAY(0x8118e34) 
>
> sub format_docpp_comment
> {
>    my @doc_comment;
>    my $comment_line;
>    my $single_comment_line;
> 
>    @doc_comment = $_[0]; # give a friendly name to the array
> 
>    foreach $comment_line ( @doc_comment )
>    {
> 	chomp $comment_line;
> 	$single_comment_line .= $comment_line;
>    }
> 
>    # At this point we have a single string that contains our entire 
doc++ 
> comment.
>    # we can now use simple pattern matching to parse it.
> 
>    # for now output it so we can see what it looks like:
>    print $single_comment_line;
>    print \n;
> } 
> 
> 

