Hi all,

This is my first time at Perl Monks, and I'm pretty new at Perl, but not that new, lol. I have a question, which should be easy to solve, but that I can't seem to find the answer to. :-(

Here is the question:

I'm making a MS-DOS search program, using glob, and I can't seem to get the questions to appear one after the other. This is just the core of the program. I'll add error messages later:

$stdin = <STDIN> ; sub ext { print "Name the extension of the file that you want to find:" ; $ext = <STDIN> ; $e = $ext ; } sub name { print "Name the filename of the file that you want to find:" ; $file = <STDIN> ; $f = $file ; } sub dir { print "Name the directory that you want to search:" ; $dir = <STDIN> ; $d = $dir ; } opendir(DIR, $dir) ; $s = "$f\.$e" ; $x = glob($s) ; print ("Here are the file(s) that you requested: $x") ;

I know it might not work, but this is a project that I started a while ago, and I just got to trying to make it work. :-)

Thanks everyone. :-)

Mr Cassata

Edit kudra, 2002-05-13 Changed title


In reply to MS-DOS search using globs by Mr_Cassata

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.