On Mon, 18 May 2015 17:32:03 +0200
Richard Taubo <[email protected]> wrote:
> Hi!
>
> Trying to remove the literal text "%st" from the command line return
> value: 0.0%st as in:
> [$] printf "0.0%st" | perl -pe 's/\%st//'
>
> I have also tried:
>
> [$] printf "0.0%st" | perl -pe 's/\Q%st\E//'
>
> Neither works.
>
> Would be happy if someone had any input here! :-)
>
> Thanks!
>
> Richard Taubo
I'm not sure what you're trying to do but if you want a percent sign in
a printf specification, use two of them.
printf "Sale: %d%% off", $percentage_off;
See `perldoc -f sprintf`
<http://perldoc.perl.org/functions/sprintf.html>
--
Don't stop where the ink does.
Shawn
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/