Mr_Cassata has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Newbie in need...
by alien_life_form (Pilgrim) on May 12, 2002 at 21:19 UTC | |
|
Re: Newbie in need...
by beamsack (Scribe) on May 12, 2002 at 21:10 UTC | |
|
Re: Newbie in need...
by Dog and Pony (Priest) on May 12, 2002 at 23:47 UTC | |
by Android 18 (Novice) on May 13, 2002 at 03:04 UTC | |
|
Programming craftmanship and Perl
by talexb (Chancellor) on May 13, 2002 at 02:10 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |