... blahblahblah... my $href='http://cad.psd.log.com/apps/dev/adkb/dc_checklist/DEMO/top/DV/'; my $check=0; for my $word(@data){ $check++; print $fh_out ''; if($check==1) { print $fh_out ''; } print $fh_out $word; if($check==1) { print $fh_out ''; } print $fh_out ''; } print $fh_out "\n"; } print $fh_out ''."\n"; close $fh_out; }