Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Read first line from each file in a directory

by mr.nick (Chaplain)
on Dec 16, 2011 at 16:31 UTC ( [id://943969] : note . print w/replies, xml ) Need Help??


in reply to Re^2: Read first line from each file in a directory
in thread Read first line from each file in a directory

I doubt that. As choroba stated, you are actually trying to open a file named $file.

mr.nick ...

Replies are listed 'Best First'.
Re^4: Read first line from each file in a directory
by Anonymous Monk on Dec 16, 2011 at 16:40 UTC

    I tried it without quotations, and it adds a new warning: "readline() on closed filehandle WRITE"

    and I did check opendir and readdir, they both work. Also, I'm not working in the root folder by accident