2
在我的Perl脚本中,我使用LWP::Simple::getstore
来检索图像并将其存储为文件。但在存储之前如何检查该文件是否已经存在?Perl LWP :: Simple :: getstore如何检查目标目录中是否存在该文件
这是片段
use constant FILE_DIR => "/home/destination/files/";
my $image_path = FILE_FOLDER."$item_id"."_"."$file_date.$image";
my $res = LWP::Simple::getstore($image_url,$image_path);
请帮助我。
感谢
'FILE_DIR' **和**'FILE_FOLDER'?这听起来很混乱。 – TLP