in reply to Grab input from the user and Open the file

my $directory = '/home/psimo/it441/challenge/logs'; ... open(FH, '<', '/home/psimo/it441/challenge/logs/$theFile') or die "CAN +'T OPEN FILE! you don't have the log file\n";

Since you have the directory hardcoded, you should say:

open FH, '<', "$directory/$theFile" or die "CAN'T OPEN FILE! you don't + have the log file\n";

Note the usage of double quotes in my suggestion. Single quotes take $theFile as literal, while double quotes interpolate the variables content.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'