Hi there,
I am having some problems with case sensitivity.
I am trying to provide links to documents, the names of which are in an @array, built from scanning a directory.
I am using a separate %hash to store the titles of the documents, provided by an index file, that lists the file names and their titles.
Using a loop through the array, I am creating links to the documents, with the text of the link being the docuemnt title.
This all works but it trips over if there is a case difference between the data in the array (src = from sys info), and the hash values (src = user updated index file).
Is there a way to globally turn off case sensitivity?
I have used the i modifier in regex but when i call the hash or loop through the array I can't see where I could put it?--;-
##array population
opendir(GSTR, $gfile) || die "Cannot scan directory $gfile: $!\n";
@gfiles =grep(!/^\.\.?$|\.dat$/, readdir GSTR);
closedir(GSTR);
##calling the values;-
foreach $gf(@gfiles) {
print "<a href='$gfrelpath$gf' target='_blank'>$bash{$gf}</a><br>";
#print $gf;}
I need the $gf from the loop to match the key entry in
%bash, otherwise it doesn't work.
Any help would be great, thanks
Jez

I am having some problems with case sensitivity.
I am trying to provide links to documents, the names of which are in an @array, built from scanning a directory.
I am using a separate %hash to store the titles of the documents, provided by an index file, that lists the file names and their titles.
Using a loop through the array, I am creating links to the documents, with the text of the link being the docuemnt title.
This all works but it trips over if there is a case difference between the data in the array (src = from sys info), and the hash values (src = user updated index file).
Is there a way to globally turn off case sensitivity?
I have used the i modifier in regex but when i call the hash or loop through the array I can't see where I could put it?--;-
##array population
opendir(GSTR, $gfile) || die "Cannot scan directory $gfile: $!\n";
@gfiles =grep(!/^\.\.?$|\.dat$/, readdir GSTR);
closedir(GSTR);
##calling the values;-
foreach $gf(@gfiles) {
print "<a href='$gfrelpath$gf' target='_blank'>$bash{$gf}</a><br>";
#print $gf;}
I need the $gf from the loop to match the key entry in
%bash, otherwise it doesn't work.
Any help would be great, thanks
Jez
