2023-05-01から1ヶ月間の記事一覧

python開発するときに仮想環境を作成

myenvという環境作成例 python -m venv myenv仮想環境アクティブ .\myenv\Scripts\activate仮想環境抜けるには deactivateVSCodeで仮想環境指定するには launch.json { "configurations": [ { "name": "Python: File", "type": "python", "request": "launch…

perlで日本語含むかどうかの判定

正確にはマルチバイト文字があるかどうかの判定 use Encode qw(decode); my $text = "こんにちは、世界!"; if (length(decode('Shift_JIS', $text)) != length($text)) { print "文字列にマルチバイト文字が含まれています\n"; } else { print "文字列にマ…