in reply to Shotgun.pl - Shoots Holes in Files
die("Target file must be plain text!") unless -f $O{target};
I thought that -f tests if a file is a plain file. In other words if it's not a directory or some other weird thing that you might encounter in a Linux file system. I was also told that -f tests if a file exists. If it doesn't, it returns false. If it's a directory, it returns false. If it's a real file that has byte contents, whether it's binary or plain text, it will return true. Am I correct?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Shotgun.pl - Shoots Holes in Files (Files References)
by eyepopslikeamosquito (Archbishop) on Jan 30, 2024 at 04:51 UTC | |
|
Re^2: Shotgun.pl - Shoots Holes in Files
by jwkrahn (Abbot) on Jan 30, 2024 at 04:33 UTC | |
|
Re^2: Shotgun.pl - Shoots Holes in Files
by Fletch (Bishop) on Jan 30, 2024 at 01:58 UTC | |
|
Re^2: Shotgun.pl - Shoots Holes in Files
by BlueSquare23 (Novice) on Jan 30, 2024 at 19:12 UTC |