Hello, I have an old script written by another admin that I no longer work with to read a text file and e-mail some info out. When I run it now it is getting the following error.

ERROR : array reference out of bounds!
Script: K:\scripts\Job_notify.kix
Line : 104

Here is part of the code

 Code:
Loop
$restart=0
$junk=open(1, "$outputdir\joblist.txt", 2)

;Check jobs run since last checktime for failures
$x=Readline(1)
Do
	$array3=split("$x", ",")
	$jobid=$array3[0]
	$type=$array3[1]
	$state=$array3[2]
	$status=$array3[3]
	$policy=$array3[4]
	$client=$array3[6]
	$starttime=ctime($array3[8],-$timezone)
	$endtime=ctime($array3[10],-$timezone)
	$runtime=$array3[9]
	$PlaceHolder=$array3[17]


It fails on $type=$array3[1] line. The source file it is reading looks like this.

 Code:
920257,17,3,0,,,,,1272459337,0000000215,1272459552,,,,,servername,,,100
920256,6,3,0,Catalog_HotBackup,Full_230AM,servername,servername,1272439957,0000002192,1272442149,L180_LTO3,0,35,0,servername,46940708,68704,100
920255,6,3,0,Catalog_HotBackup,Full_230AM,servername,servername,1272439814,0000000145,1272439959,L180_LTO3,2,7,0,servername,85562,7,100
920254,6,3,0,Catalog_HotBackup,Full_230AM,servername,,1272439800,0000000154,1272439954,,5,,,servername,,,100
920253,6,3,0,Catalog_HotBackup,-,servername,servername,1272439800,0000002349,1272442149,,1,35,0,servername,,,100


Anyone have ideas?