Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
エラーコードがあります:
Invalid conversion in printf: "%A"' printing %A characters in a URL
これが私のコードです:
$url =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg; printf "%-10s $url\n", $res_request{$key};
どうすればこれを修正できますか?
どうもありがとう、AL
$urlフォーマット文字列を入れる代わりに、次のフォーマットを使用して%sください。
$url
%s
printf "%-10s %s\n", $res_request{$key}, $url;
(書式設定コードと間違われる可能性のある部分を含む書式文字列に変数を補間しないでください。)