新石器Wiki

近年はシリコン(石)から進化した便利なもので溢れる時代。そんな気になった事や試した事など記す。

ユーザ用ツール

サイト用ツール


software:windows:activeperl


ActivePerl

ActivePerl」は、ActiveState社が提供している Perl のディストリビューション。主にWindows環境で利用される。

インストール

下記URLからインストールファイルを入手し実行インストール。

https://www.activestate.com/activeperl

実行確認

Windowsのコマンドプロンプトを起動し「perl -v」コマンドが実行できるか確認。

>perl -v

This is perl 5, version 24, subversion 3 (v5.24.3) built for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2017, Larry Wall

Binary build 2404 [404865] provided by ActiveState http://www.ActiveState.com
Built Dec 11 2017 11:09:26

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.

上記のようにバージョンが表示されればOK。

テストプログラムの実行

下記の test.pl ファイルをエディターで作成。

test.pl
#! /usr/bin/perl
#
# test program
 
use strict;
use warnings;
 
my $name = "権兵衛";
 
print "私の名前は、$nameです。\n";
  • use strict;use warnings; は、厳格な文法チェックとワーニングを表示する指定。

実行してみる。

> perl test.pl
私の名前は、権兵衛です。

参考

software/windows/activeperl.txt · 最終更新: 2018/07/01 09:04 by yoko