gisrob has asked for the wisdom of the Perl Monks concerning the following question:
The code opens the outfile, but prints nothing to it, and just hangs. Any advice on how to accomplish this? Thanks#!usr/bin/perl $folder1 = "C:/neaq/ArcData/bluefin/data_analysis/1994sptr/data"; chdir "$folder1"; $textfile = "10.06.94.txt"; open(INFILE, $textfile) or die "Cannot open: $textfile\n"; while(<INFILE>) { chomp; @data = split; ($mask, $x, $y, $dfront, $ftdens, $depth, $slope, $tuna, $temp, $s +ptr) = @data; } close(INFILE); $folder2 = "C:/neaq/ArcData/bluefin/data_dens/1994sptr"; chdir "$folder2"; $textfile2 = "10.06.94.txt"; open(INFILE2, $textfile2) or die "Cannot open: $textfile2\n"; while(<INFILE2>) { chomp; @data2 = split; ($mask, $x, $y, $ftdens) = @data2; } close(INFILE2); open(OUTFILE, "> newdens.txt"); while (<>) { print OUTFILE $data[1], $data[2], $data[3], $data[4], $data[5], $d +ata[6], $data[7], $data2[3], "\n"; } close(OUTFILE);
|
|---|