What's the best simplest way to detect a file from a directory?

Posted by Nano HE on Stack Overflow See other posts from Stack Overflow or by Nano HE
Published on 2010-03-24T08:45:07Z Indexed on 2010/03/24 8:53 UTC
Read the original article Hit count: 200

Filed under:
|
|

My code like this, I looked up the open command, but I am not sure it is the simplest way or not.

if  #Parser.exe exist in directory of Debug
{
    move ("bin/Debug/Parser.exe","Parser.exe");
}
elsif  #Parser.exe exist in directory of Release
{
    move ("bin/Release/Parser.exe","Parser.exe");
}
else
{
    die "Can't find the Parser.exe.";
}

Thank you.

© Stack Overflow or respective owner

Related posts about perl

Related posts about directory