Ok, you can use a one liner to transform the arguments into key=value pairs in a hash table.
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
my %arg = map{my($key,$val)=split/=/;$key=>$val}@ARGV;
print Dumper(\%arg);
And when running this with the command-line parameters in your example, I got the following result:
$VAR1 = {
'lexwhere' => '\'in(\'DIS\', \'DIM\', \'DIR\')\'',
'title' => '\'this is a title\'',
'vchtyp' => 'I',
'jrnltyp' => 'D'
};
|