On Mon, 18 May 2015 17:32:03 +0200 Richard Taubo <o...@bergersen.no> 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: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/