in reply to Re^2: split file
in thread split file

I just copied the code as posted and ran it using AS Perl 5.8.7 (815). It performed as expected. You could try adding use diagnostics; at the start of the code - it may give you more information about the warning.


DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^4: split file
by Anonymous Monk on Feb 13, 2006 at 21:33 UTC
    Thanks for your help so far. I've got through the previous error and this code works fine with the data I've posted. I made some changes to reflect the actual data, but I now have the same problem where the output doesn't show up in the right order.
    This's my actual data file: I have spent much time on this but I still cannot have it working properly. Please help.

      You need to select the bill number for $currBill. Your current regex match patterns don't include capture brackets so there is no meaningfull value in $1. Try something like these:

      if (/^1010100.{17}(.{13})/) { } elsif (/^3010330.{17}(.{13})/) {

      DWIM is Perl's answer to Gödel
        That doesn't seem to work for me. It outputs the original file as before. Also, what does the . represent? I'm not too good with regular expressions.

        Thanks.