in reply to Re^2: inserting array of data into text file
in thread inserting array of data into text file

meant following not subs e! $_ =~ s/^(\S\s+\S)/$1 $coli++/\e;
  • Comment on Re^3: inserting array of data into text file

Replies are listed 'Best First'.
Re^4: inserting array of data into text file
by Anonymous Monk on Jul 13, 2004 at 14:00 UTC
    with  $_ =~ s/^(\S\s+\S)/$1, $col[$i++]/e; stops in the same place? does this point to a key problem?
      Without seeing the rest of your code, I can provide no further help.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      I shouldn't have to say this, but any code, unless otherwise stated, is untested

        this is main code causing the problem
        print "Testing File:\n"; $file = <STDIN>; print "Output File:\n"; $file2 = <STDIN>; open (FILE, "<$file"); open (OUT, ">TRUE_OUTPUTS"); open (FILE2, "<$file2"); open (OUT2, ">COMPARE"); while (<FILE>) { if ($_ =~ m/^\d\s+\d/) {print OUT $_} } while (<FILE2>) { push @col, $_ =~ m/(\S+\s+\S+)/; } close(COL); print (OUTPUT @col); $size = scalar @col; print $size; open(COL, "<TRUE_OUTPUTS"); while(<COL>) { $_ =~ s/^(\S\s+\S)/$1 $col[$i++]/; print OUT2 $_; }