# to read from the file open (FILE,"){ ($tmp_state,$tmp_job) = split /\|/,$_; push @job, $tmp_job; } # sort @job or @state how you would like # Print html header foreach $tmp_job(@job){ # Print html with @job for a value and } # Print html footer