gupr1980 has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl script

open my $file, '<', $filename or die $!; seek $file, $offset, 0 or die "Report error - $!";

when I pass a non numeric offset, the perl script errors out but it doesn't seem to go to the die section. It does not print the "Report error ... message. I got a tip from another forum to add a quote around the file handle of the seek command

seek "$file" blah blah

this works and now the perl goes to die and prints the error message. I don't understand why this quote was necessary. Please explain if you can. thanks for your time.