I have two started the first is my attempt to read the file into an array, the second is processing each variable. I am unsure how to identify the last variable in a variable length line of data.
open (input, 'c:\organization.txt') or die "Cannot open file: $!"; @data=<input>; foreach $line(@data){ print $line; } open ('input', 'c:\organization.txt') or die "Cannot open file: $!"; open ('output', '>C:/out.txt') or die "Cannot open file: $!"; while (<input>) { my ($v1,$v2,$v3,$v4,$v5,$v6,$v7,$v8,$v9,$v10,$v11,$v12,$v13,$v14,$v15,$v16,$v17,$v18,$v19,$v20,$v21,$v22,$v23,$v24) = split (/,/); print output "$v1,$v2,$v3,$v4,$v5,$v6,$v7,$v8,$v9,$v10,$v11,$v12,$v13,$v14,$v15,$v16,$v17,$v18,$v19,$v20,$v21,$v22,$v23,$v24\n"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/