Instead of retrieving and comparing the inodes yourself, try this:<br><br>use Cwd;<br>Cwd::realpath /a/b/c<br><br>and check if it is the same as Cwd::realpath /x/y/z<br><br>HTH<br><br>Antonio<br><br><div class="gmail_quote">
On Sat, Apr 28, 2012 at 10:46 AM, Indy Singh <span dir="ltr"><<a href="mailto:indy@indigostar.com" target="_blank">indy@indigostar.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:12pt;font-family:'Calibri'">
<div>Thanks, that worked.</div><div class="im">
<div> </div>
<div>Indy Singh<br>IndigoSTAR Software -- <a href="http://www.indigostar.com" target="_blank">www.indigostar.com</a></div>
</div><div style="font-size:small;font-style:normal;text-decoration:none;font-family:'Calibri';display:inline;font-weight:normal">
<div style="font:10pt tahoma">
<div><font face="Calibri" size="3"></font> </div>
<div style="background:none repeat scroll 0% 0% rgb(245,245,245)">
<div><b>From:</b> <a title="fulko.hew@gmail.com" href="mailto:fulko.hew@gmail.com" target="_blank">Fulko Hew</a> </div>
<div><b>Sent:</b> Saturday, April 28, 2012 8:59 AM</div>
<div><b>To:</b> <a title="indy@indigostar.com" href="mailto:indy@indigostar.com" target="_blank">Indy Singh</a> </div>
<div><b>Cc:</b> <a title="toronto-pm@pm.org" href="mailto:toronto-pm@pm.org" target="_blank">toronto-pm@pm.org</a> </div>
<div><b>Subject:</b> Re: [tpm] How determine the real directory
path</div></div></div>
<div> </div></div><div><div class="h5">
<div style="font-size:small;font-style:normal;text-decoration:none;font-family:'Calibri';display:inline;font-weight:normal">
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sat, Apr 28, 2012 at 7:29 AM, Indy Singh <span dir="ltr"><<a href="mailto:indy@indigostar.com" target="_blank">indy@indigostar.com</a>></span> wrote:<br>
<blockquote style="border-left:1px solid rgb(204,204,204);margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:'Calibri';font-size:12pt">
<div>Hello all,</div>
<div> </div>
<div>I want to copy files from one directory to another where the directory
paths are something like:</div>
<div>/a/b/c to /x/y/z</div>
<div> </div>
<div>I need to detect if the two directory paths are identical after symbolic
links are resolved, in order to skip the file copy.</div>
<div> </div>
<div>Using File::Copy::copy sets $! to ‘No such file or directory’</div>
<div> </div>
<div>
<div>Using cp from a shell prompt gives an error like:</div>
<div>cp: `/a/b/c/foo.txt' and `/x/y/z/foo.txt' are the same
file<br></div></div>
<div>
<div>Anyone have an idea how to resolve
this?</div></div></div></div></div></blockquote>
<div><br>Can you use stat() to get the inodes of both directories to see if they
are the same?<br><br><br></div></div></div></div></div></div></div></div></div>
<br>_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
<br></blockquote></div><br>