How do I find a user's home directory in Perl?

前端 未结 5 649
借酒劲吻你
借酒劲吻你 2020-12-05 12:48

I need to check whether a file in a user\'s home directory exists so use file check:

if ( -e \"~/foo.txt\" ) {
   print \"yes, it exists!\" ;
}
5条回答
提交回复
热议问题