That is right if the percentage is calculated relative to the net. Usually, it's done as a percentage of the total charge. Example:
My company bills the client $60/hour, and takes 20% of that, leaving me 80% of $60, or $48 per hour. If I want the net to me to be $60, the equation is:
.8 * X = 60
...solving for X...
X = 60 / .8 = 75
... or more generally:
Gross_Charge = Net_Pay / (100 - percentage)%
No Perl code was harmed -- or even used -- in the production of this post.