stonemonolith
Programmer
- Jul 22, 2006
- 4
I'm fairly new to perl, so I don't know all the perl syntax. I have several scripts I've written in ksh, and I want to rewrite them in perl, to take advantage of it's speed.
I have a ksh script that searches through a directory to find certain files. The directory has 100's of files, so I have to use find - since we don't know what files to look for until runtime, all of the search criteria are passed in.
Here is the find I use in the ksh script:
list=`find $datadir -type f -name "s_${id}.*${tbl}.*${ext}" -print`
I'm sure there must be a simple answer, but I can't find it. I tried using glob in perl, but I can't get it to work with the variables; I finally figured out the syntax of the perl find command, but again I couldn't get it to work with the variables (only hard-coded search criteria). HELP!
tia
I have a ksh script that searches through a directory to find certain files. The directory has 100's of files, so I have to use find - since we don't know what files to look for until runtime, all of the search criteria are passed in.
Here is the find I use in the ksh script:
list=`find $datadir -type f -name "s_${id}.*${tbl}.*${ext}" -print`
I'm sure there must be a simple answer, but I can't find it. I tried using glob in perl, but I can't get it to work with the variables; I finally figured out the syntax of the perl find command, but again I couldn't get it to work with the variables (only hard-coded search criteria). HELP!
tia