So let's think this through.

  1. "select a file from the command prompt"
    I'm not familiar with any form of "command prompt" -- familiarity being limited to RT-11, cpm, windoze & *nix -- that allows anyone to "select" anything. So I guess that means I'm not really going to be able to satisfy the "command prompt" part of your spec... or else that "command prompt" means something I don't understand... or else that "command prompt" means something other than what you appear to believe.
  2. "user to be able to use commands like CD"
    Well, you could spawn a new CLI with backticks (neither exec nor system will work for what appears to be your purpose) and let the user play, but that's not really a terribly secure idea, even if you're writing a program for installation on the user's own machine. So, 'fergeddaboudit'!
  3. "wanna stor the result in a string"
    Yeah, that would be really cool... but if you want to do that, you probably better build a webpage, a couple scripts to (1) deal with the form you're going to put in the html and (2) to do the work to achieve whatever your ultimate (and un-articulated) goal may be
    ...or
    step onto the learning curve for building a gui (It may be worthwhile to read perldoc Tk).

Bottom lines:


In reply to Re: User Select File Capability by ww
in thread User Select File Capability by perly_newbie

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.