Hi there,
I am writing a small script to search a text database (data_file.txt) that I have already read into a hash of arrays. My command line should look like:
my problem is that there is usually going to be more than one word following the -k, for example:
currently this only matches records that contain 'alcohol' as opposed to the whole phrase 'alcohol dehydrogenase' - is it possible to get the getopt module to store everything that follows the -k flag into the $opts{k} variable, rather than just the first word?
Many thanks
I am writing a small script to search a text database (data_file.txt) that I have already read into a hash of arrays. My command line should look like:
Code:
./search.pl -i data_file.txt -k search terms
my problem is that there is usually going to be more than one word following the -k, for example:
Code:
./search.pl -i data_file.txt -k alcohol dehydrogenase
currently this only matches records that contain 'alcohol' as opposed to the whole phrase 'alcohol dehydrogenase' - is it possible to get the getopt module to store everything that follows the -k flag into the $opts{k} variable, rather than just the first word?
Many thanks