in reply to MS-DOS search using globs
before you are trying to use the variables will at least ask the questions... but before anything else, you need to turn on strict and use -w. Please.&dir; &name; &ext;
Then, decide which method you want to use. Either the combination opendir/readdir or glob. They don't have anything to do with each other (so scratch the opendir for now, and read up on glob, if that is your chosen way). That is one of the reasons it will not return any files from directory $dir.
I furthermore ask why you are doing:
when$ext = <STDIN> ; $e = $ext ;
does the job? In reality, I see no use for such a small program to use subroutines at all, or at least use one, slightly bigger instead for this. I'd also consider returning values from them, if you have them, instead of setting global variables.$e = <STDIN> ;
Hmm... that was a lot of complaining. :( Sorry about that, but well, you would have a lot easier time if you listened to some of it at least. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Just a note..
by Android 18 (Novice) on May 13, 2002 at 03:04 UTC |