I have an error code:
Invalid conversion in printf: "%A"' printing %A characters in a URL
Here is my code:
$url =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;
printf "%-10s $url\n", $res_request{$key};
How can I fix this?
Thank you very much, AL
Instead of putting $url in the format string, use an %s format:
printf "%-10s %s\n", $res_request{$key}, $url;
(You should never interpolate variables into the format string that have parts that may be mistaken for formatting codes.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With