in reply to Array address returned as part of list
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 |