in reply to Change permissions after file is created
Guessing from the two lines of code you shared, $outfile most likely contains a filehandle, not a filename. Pass a filename to chmod instead, and all should be fine.
EDIT: also, as boftx pointed out, single quotes will keep perl from interpolating the variable into your string, so $outfile is being interpreted by your shell instead -- and most likely evaluates to the empty string, hence the error message.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Change permissions after file is created
by boftx (Deacon) on Jul 08, 2014 at 21:05 UTC |