in reply to Parsing multi-line record with varying data
Update: Added "close $LOGFH;" ... because I'm a nice guy and like to keep the OS happy, and my code clean/complete.#!/usr/bin/perl #use DateTime; use strict; use warnings; my $LOGFILE = 'parsechunk.data'; local $/ = "\nrn:"; my $x=0; open(my $LOGFH,"<",$LOGFILE) or die("Couldn't open '$LOGFILE:$!"); while(<$LOGFH>) { #chomp; print $_, "==RECORD END++\n"; my $id_count = () = m/(id-info:)/og; print " Found $id_count ID's in last chunk\n"; } close $LOGFH;
My goal ... to kill off the slow brain cells that are holding me back from synergizing my knowledge of vertically integrated mobile platforms in local cloud-based content management system datafication.
|
|---|