I have 2 paths and only one will ever exist. I want to end up with a variable with the path that exists in it. I can do this with if/elsif's but I figure there's a better way
I do not want to use any non default modules. I will be using the latest ActiveState build.
For Example:

For Example:
Code:
$path1 = "/path/to/file1";
$path2 = "/path/to/file2";
if (-e $path1) { $fpath = $path1; }
elsif (-e $path2) { $fpath = $path2; }
else { die "Freakin out cause neither exist\n"; }