In which case you probably don't want to be confusing things by replacing chmod. What you want to do is a completely separate operation and should be called something different.
Otherwise you'll just confuse everybody. (Including yourself in 6 months time!)
in reply to Re^4: Hijacking perl functions
in thread Hijacking perl functions