If you're simply using "filename.txt" as the filename, the file should be in the same folder as your program.
You have an error in your syntax. It should be
my $file = 'filename.txt';
open(my $filehandle, "<", $file) or die "Could not open file $file. Error: $!";
Having opened the file, bear in mind there are different ways of reading from it. Sometimes you might want to read it a line at a time, in which case the syntax would be something like this:
while (my $line = <$filehandle>) {
chomp $line;
print "$line\n";
}
Sometimes you might want to read the entire file into one variable, in which case the syntax would be something like this:
my $file = "filename.txt";
my $document = do {
local $/ = undef;
open my $filehandle, "<", $file
or die "could not open $file: $!";
<$filehandle>;
};
(see this question for more info)
Notwithstanding the amount of information available, seemingly simple things like this can be frustrating when you're learning a new language. You won't regret learning Perl if you stick with it. And remember the Perl motto: TMTOWTDI :-)