thanks for the info. This is what I've got to work so far.
# brings in arrays song_title and song_files &song_list; &file_list; #works by single elements my %test = ($song_titles[0], $song_files[0], $song_titles[1], $song_files[1]); foreach my $key (keys %test) { print qq[<br> Delete this File: $key <INPUT TYPE="checkbox" NAME=" +files" VALUE="$test{$key}">\n]; }
Whatever is selected is then passed on to another subroutine that takes the value of "file" and deletes the file
# check for tainted data my $files = $q->param( "files") || error( $q, "couldn't read File valu +e"); $files =~ /^([\/.\w.]+)$/; # The "untainted" file is now in $1 $files = $1; die "Bad filename" unless $files; foreach ($files){ unlink($_); }
However I still can't figure out how I would delete the song title that goes with the song file. How could I also pass the value of the key (song_title) along with the song file? also I tried doing
my %test = (@song_titles, @song_files);
however, it printed out the first key right (song_title) but the next key contained the song file as the key and so on ... thanks in advance...

In reply to Re: Re: Re: Re: Adding and Deleting Upload File name and File by lex2001
in thread Adding and Deleting Upload File name and File by lex2001

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.