Can a Perl script modify itself?

前端 未结 6 1448
旧巷少年郎
旧巷少年郎 2020-12-31 10:48

I would like to have my scripts keep track of thier last date of revision internally as a comment. Is this possible? It seems to me that it would need to grab the date and

6条回答
  •  时光说笑
    2020-12-31 11:48

    By request adding my comment as an answer.

    Sounds like you already know how to do it. If it is a perl script on a unix/linux box then permissions should not be an issue, if it is on a windows box it might not let you as the file is in use.

提交回复
热议问题