go ahead... be a heretic | |
PerlMonks |
using finddepth with part of directory nameby jsons (Initiate) |
on Oct 19, 2007 at 19:32 UTC ( [id://646056]=perlquestion: print w/replies, xml ) | Need Help?? |
jsons has asked for the wisdom of the Perl Monks concerning the following question: I need to update a perl program that prints
a hyperlink to an autocad drawing. The link will be
based on a truck number that the user enters into an
html page. That page then posts their entries to
this perl script.
How can I perform a search on a directory by using only
the first part of the directory name?
Below is the code that I must update, trimmed down for this posting:
This page (cadsearch.cgi) uses another perl page (find_dir_all.pl) that returns a directory to search based on the truck number. The issue that I am having is that I know only the first part of the directory to search due to inconsistent file naming habits. The first part of the directory will be returned to this program. I need to be able to search for a directory that matches the first part of the directory name. Example: Joe User searches for truck number 12345. I know that the directory will be something like: BID.12345 Wanna B. Company or Quote.12345 Gonna Geta Truck I know everything up to the end of the number and it will be a unique directory, but I will not know what the customer name added to the end will be.
Back to
Seekers of Perl Wisdom
|
|