As part of a requirement traceability tool that I have maintained over the last while, I need to build simple markup source filelists. It can be monotonous building the files from the increasingly large number of files that need to be parsed. A solution was required and as usual I turned to perl. With a simple application of the perl File::Find module I can traverse a source directory and build my input filelist. In the example below the File::Find wanted function is inlined and builds each file path into a <MDL> tag. The .mdl extension presents simulink design files, as required to be parsed by my script tool.

@ARGV = qw(.) unless @ARGV;
use File::Find;
find sub {
    print "<MDL>", $File::Find::name , "</MDL>\n" if /\.mdl$/
        }, @ARGV;

More to follow on the requirements management tool soon!