in reply to "touching" a file
You cannot usually create a regular file without opening it (this does not apply to a directory). There is only one way around this I know, and that only works for the super-user: the mknod syscall.
Update: added readmore. You don't want to know why.
You don't have to create a perl filehandle object however, you can create a unix filehandle with syscall, but that is ugly:
(You'd have to change this to work in windows of course.)$h = syscall 5, ($n="filename"), 65, 0777; $h<0 and die $!; syscall 6, + $h;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "touching" a file
by DrHyde (Prior) on Jun 17, 2004 at 21:07 UTC | |
by ambrus (Abbot) on Jun 18, 2004 at 07:15 UTC |