Hi all,
I am writing a subroutine which is intended to take an array of strings, and concatenate each string in the array into a single [very long] string.
The subroutine is listed below.
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)
printed out instead. Can anyone see why this is happening?
thanks heaps
David Buddrige.
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 = $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";
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- converting "strange" characters Duarte Cordeiro
- Re: converting "strange" characte... Josimar Nunes de Oliveira
- passing an array and a hash to a subrou... David Buddrige
- Re: passing an array and a hash to ... David Buddrige
- Re: passing an array and a hash... Sudarshan Raghavan
- Re: passing an array and a hash to ... David Buddrige
- Re: passing an array and a hash to ... John W. Krahn