http://www.perlmonks.org?node_id=104542


in reply to Opening a file called by a hash value

Greetings fellow monk, you seem to be already an experienced programmer so i wonder if what is following will be of any help , but since it won't take me too long to write ... You have already been perfectly answered so i won't add any thing this topic . I will rather tell you how to uncover what was your mistake when you have that kind of error message . It couldn't be a problem with the opening of the file , as you could have been sure of with using the useful checking tip of "or die $!;". Tell yourself that with Perl flexibility , anything that could receive , as an argument , a string between two quotes can be replaced by a variable holding a string : open (FILE,"/root/blahblah"); is litteraly equivalent to $file="/root/blahblah"); open (FILE,$file); So your line hadn't any problem . What could it be then ? Nine times out of ten , it's a problem of a mispelling or missing semicolon . So , as the two lines mentionned didn't and couldn't have any problem , it had to be a problem that existed before and that had been reported from one line to the following until it became critical . So as the other monk did certainly , i looked upwards line after line to find the guilty one ... And bingo !
<HTML><BODY> the little one. </BODY></HTML>