in reply to Array address returned as part of list

The output you are seeing is a stringified array reference (see The Rest in perlreftut). The issue happens because you first put an array reference in the same variable you are concatenating into. You could fix this by using two variables, for example:

my $jobdirectory = "../jobs/"; my $linklist = joblist($jobdirectory); my $output = ''; foreach my $jobInDirectory (@$linklist) { next unless ($jobInDirectory =~ m/\.html$/); $output .= '<a href="http://post/jobs/' . $jobInDirectory . '">' . + $jobInDirectory . '</a>' . '<br />'; } open (LISTING, '>> ../jobs/index.html'); print LISTING $cgi->start_html( -title => 'Job Postings') . '<div id="main">' . $output . '</div>' . $cgi->end_html . "\n";

Note as well I changed your concatenation into a compound assignment ($x .= in place of $x = $x .). See Assignment Operators in perlop.

Replies are listed 'Best First'.
Re^2: Array address returned as part of list
by t.b.b. (Initiate) on Nov 16, 2010 at 19:22 UTC
    kennethk,
    You nailed it dude, er, honorable monk!

    Thank you! (and thanks for the .= tip for concats :)
    -t.b.b.