2024/02/13 22:13:39

WindowsにPerlをインストールする Strawberry Perl

Windows 10 で PowerShell を利用するとき、Perl ワンライナーが欲しくなることも多い。

Windows で Perl を利用するなら(たぶんもっともメジャーで簡単にインストールできる) Strawberry Perl をインストールしよう。

http://strawberryperl.com/

.msi をダウンロードしてきて、インストールする。

C:\Strawberry\ あたりにインストールされる。

Strawberry Perl をインストールしたらPC再起動は不要だが、Windows Power Shell は再起動しないといけない。もしくは自力でパスを追加すれば使えるかもしれない。

$ perl -v

This is perl 5, version 30, subversion 2 (v5.30.2) built for MSWin32-x64-multi-thread

Copyright 1987-2020, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Strawberry Perl には cpanm コマンドが最初から入っているので、すぐにモジュールを追加していくことができる。

サイト内検索