in reply to Re^3: Perl Best Practices book: is this one a best practice or a dodgy practice?
in thread Perl Best Practices book: is this one a best practice or a dodgy practice?
Yes, there are ways to fool this. Ideally, there would be some is_same_real_file() in File::Spec that would take into account symlinks, case sensitivity, volume names, and the like.use File::Spec::Functions( rel2abs canonpath ); my $full_inpath = canonpath( rel2abs( $infile ) ); my $full_outpath = canonpath( rel2abs( $outfile ) ); if ( $full_inpath eq $full_outpath ) { ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Perl Best Practices book: is this one a best practice or a dodgy practice?
by theorbtwo (Prior) on Sep 09, 2005 at 13:16 UTC |