Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Splitting a file into records

by Laurent_R (Canon)
on May 03, 2013 at 21:05 UTC ( #1031959=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($TEXTIN,$HTMLOUT);
    my $input2 = $outputfile;
    my $output2 = "FTFIMS.html";
    ...
    my $rxRecStart = qr{STORE\d+};
    my $rxRecStop = qr{\n\s};
    my $recordStr = q{};
    
  2. or download this
    open $TEXTIN,"<",$input2 || die "Can not open $input2: $!\n";
  3. or download this
    open ($TEXTIN, "<", $input2) || die "Can not open $input2: $!\n";
  4. or download this
    open $TEXTIN, "<", $input2 or die "Can not open $input2: $!\n";
  5. or download this
    open my $TEXTIN, "<", $input2 or die "Can not open $input2: $!\n";
  6. or download this
    my $header = "";
    $header .= <$TEXTIN> for 0..1; # record the first two lines for later 
    +use
    while(<$TEXTIN>){
    ...
         }
    }
    # add code here for storing the last section
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031959]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-02-19 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (266 votes). Check out past polls.

    Notices?