Those are warnings, not errors. This line in your code should just be removed:
@file_name = $dir . $fname;
it appears to not be doing anything and its not the correct way to assign values to an array anway. Do this to try and track down the missing scalar value:
Code:
($inode,$fname) = split (' ', $record);
print "[$inode] - [$fname]\n";