# inout3.pl
# 内容 :　splice関数のテスト
# Copyright (c) 2002 Mitsuo Minagawa, All rights reserved.
# 使用方法 : c:\>perl inout2.pl
#
open(IN1,"input.txt");
open(OUT1,">output.txt");
#
#入力データが終了するまで繰り返す。
#
while($line1	=	<IN1>){
	chomp($line1);
	@in1	=	split(",",$line1,-1);
	$out1	=	join(",",@in1);
	print	OUT1	"$out1\n";
	@tmp	=	splice(@in1,1,3);
	$out1	=	join(",",@in1);
	print	OUT1	"$out1\n";
	$out1	=	join(",",@tmp);
	print	OUT1	"$out1\n";
}
close(IN1);
close(OUT1);
		
