in reply to Re^11: converting binary to decimal
in thread converting binary to decimal
If it's in the same scope, yes.
Not sure what header means for you.
> Can I write "no feature 'bitwise';" inside binary2decimal() to make sure it doesn't misbehave?
Theoretically yes, try it out.
Better use feature bitwise and change the operator to |. ... But this wouldn't work in older Perl.
So in case backwards compatibility is an issue, maybe no combined with if Version >...
In general, if someone was copying that code into his scope, you shouldn't be bothered about their fate. It's their responsibility.
The right approach of sharing code is to use modules, not boilerplating.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|