in reply to reading from filename '-'
What you want to do will work with the one or two argument versions of open but not with the three argument version.