Newsgroups: fj.lang.perl
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!news.Hawaii.Edu!omron3!uhog.mit.edu!news.sgi.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.sprintlink.net!news-peer.sprintlink.net!uunet!in3.uu.net!192.244.176.52!news.iij.ad.jp!othp1.sci.jri.co.jp!othp1!mishima
From: mishima@osa.sci.jri.co.jp (Masahiro Mishima)
Subject: Re: $year=localtime(time)[5]
In-Reply-To: ueno@ajisai.msil.co.jp's message of 27 Jan 1997 07:49:22 GMT
Content-Type: text/plain; charset=ISO-2022-JP
Message-ID: <MISHIMA.97Jan27182521@oppc1>
Sender: news@osa.sci.jri.co.jp (NetNews)
Nntp-Posting-Host: oppc1
Organization: The Japan Research Institute,LTD.,JAPAN
References: <UENO.97Jan27164822@ajisai.msil.co.jp>
Mime-Version: 1.0 (generated by tm-edit 7.59)
Date: Mon, 27 Jan 1997 09:25:21 GMT
Lines: 19
Xref: galaxy.trc.rwcp.or.jp fj.lang.perl:1669
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.perl&nb=1669&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

In article <UENO.97Jan27164822@ajisai.msil.co.jp> ueno@ajisai.msil.co.jp (Ueno Kouichi) writes:

>  perl5.001$B$^$?$O(Bperl4.0$B$G(B
>  ueno % perl
>  $year= (localtime(time))[5];
>  print $year,"\n";
>  ^D
>  97

>  $B$G!"Ez$,#9#7$H5"$C$F$-$^$9!##1#9#9#7$H$9$kJ}K!$OL5$$$N$G$7$g$&$+!)(B

$year = (split(/\s/,scalar(localtime)))[4];
print $year,"\n";

$B$G$O$I$&$G$;$&$+!#(B

--
$B!J3t!KF|K\Am9g8&5f=j!!%$%s%U%)%a!<%7%g%s!&%F%/%N%m%8;v6HIt(B
$B!!!!!!%I%-%e%a%s%H!&%(%s%8%K%"%j%s%0!&%0%k!<%W!!;0Eh!!@590(B
