my $infile = "COSC146_project01_dataset_2.txt"; #project input file. my $outfile = "fileoutput.txt"; # assigned an output file. open FILE,$infile or die "failed to open!"; #open project text. open OUT, ">fileoutput.txt" or die "failed to output!"; my $line = undef; #read line by line. Assigned global value to the scalar line. my $text = ; # Split on spaces. my @items = split ' ', $text; use Data::Dumper; #print Dumper(@items); print "$items[0]\t"; print "$items[2]\t"; print "$items[1]\t"; print "$items[3]\t"; print "$items[18]\t"; print "$items[23]\t"; print "$items[34]\t"; print "$items[36]\t"; print OUT "$items[0]\t"; print OUT"$items[2]\t"; print OUT"$items[1]\t"; print OUT "$items[3]\t"; print OUT"$items[18]\t"; print OUT "$items[23]\t"; print OUT"$items[34]\t"; print OUT "$items[36]\t";