HAHA, I see what you mean, my fault...let me just come clean.

I am trying to write a script to delete a list of files from a single file specified by the user and a path specified by the user also. The thing is, I'm clueless on how to join the $path from the STDIN and the array given from the original file. This is what I've got:
use File::Spec; print "File Name?\n"; $ToBeDeleted = <STDIN>; open(IN, $ToBeDeleted) or die " The file $TheFile .....Missing In Acti +on.\n"; @arr = <IN>; print "Directory where files are located?\n"; $Path = <STDIN>; $x=File::Spec->catfile("$path","@arr"); unlink $x;
unlinking should be easy once I get the elements of the array and the path finally combined I think. Any ideas? Thanks...sorry that first post was so unclear, I'm running on 4 hours of sleep!!

In reply to Re: Re: file::spec and catfile? by KStowe
in thread file::spec and catfile? by KStowe

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.