in reply to case & sleep_deprivation=$crap

Try:
if ($infodir1 eq $lowercase)
If you meant numerical comparison, you would also need to use double equal signs, ==, instead of just one. What you are doing now is an assignment. And thus, perl thinks that $lowercase{ .... } is meaning a hash element.
You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.