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;
In reply to Re: "touching" a file
by ambrus
in thread "touching" a file
by drock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |