in reply to Re: "touching" a file
in thread "touching" a file

Why the ($n="filename") and not just "filename"?

Replies are listed 'Best First'.
Re^3: "touching" a file
by ambrus (Abbot) on Jun 18, 2004 at 07:15 UTC

    Perl 5.6.1 gives me "Modification of a read-only value attempted" without the assignment.

    From perldoc perlfunc syscall:

    You can't use a string literal (or other read-only string) as an argument to "syscall" because Perl has to assume that any string pointer might be written through.

    (Update:) you can probably get around this with unpack"i",pack"p","filename" but I haven't tried.