<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hexe19 &#187; Perl</title>
	<atom:link href="http://hexe19.net/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://hexe19.net</link>
	<description>*scratch*</description>
	<lastBuildDate>Sat, 16 May 2009 03:54:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WSH &#8211; Perl</title>
		<link>http://hexe19.net/2008/03/02/6/wsh-perl/</link>
		<comments>http://hexe19.net/2008/03/02/6/wsh-perl/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 18:11:37 +0000</pubDate>
		<dc:creator>you</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[WSH]]></category>

		<guid isPermaLink="false">http://hexe19.net/wp/2008/03/02/6/</guid>
		<description><![CDATA[WSH で Perl を使えるようにできるらしい。
デフォルトはで、WSH には VBScript と JavaScript が使える。
WSH で Perl を使えるようにするには、ActivePerl をインストールすればいい。
そうすると、 pls という拡張子のファイルが WSH(Perl) のファイルと認識されてダブルクリックで実行できるようになる。
hello.pls
#!/bin/perl -w

our $WScript = $WScript;

use strict;
use warnings;

$WScript->Echo("Hello World!");


１行目のshebangは無くていい。
use strict; を使いたい場合は、use strict; よりも前の行で、our $WScript = $WScript; としないと変数が宣言されてないといわれてエラー。
実行するにはダブルクリック。

]]></description>
			<content:encoded><![CDATA[<p><a href='http://hexe19.net/2008/03/02/6/activeperl-logo/' rel='attachment wp-att-14' title='ActivePerl Logo' class="entry-image"><img src='http://hexe19.net/wp/wp-content/uploads/2008/03/activeperl_logo.gif' alt='ActivePerl Logo' /></a>WSH で Perl を使えるようにできるらしい。</p>
<p>デフォルトはで、WSH には VBScript と JavaScript が使える。</p>
<p>WSH で Perl を使えるようにするには、<a href="http://www.activestate.com/downloads/" target="_blank">ActivePerl</a> をインストールすればいい。</p>
<p>そうすると、 pls という拡張子のファイルが WSH(Perl) のファイルと認識されてダブルクリックで実行できるようになる。</p>
<p>hello.pls</p>
<pre class="code">#!/bin/perl -w

our $WScript = $WScript;

use strict;
use warnings;

$WScript->Echo("Hello World!");
</pre>
<ul>
<li>１行目のshebangは無くていい。</li>
<li>use strict; を使いたい場合は、use strict; よりも前の行で、our $WScript = $WScript; としないと変数が宣言されてないといわれてエラー。</li>
<li>実行するにはダブルクリック。</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://hexe19.net/2008/03/02/6/wsh-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
