Johndow has asked for the wisdom of the Perl Monks concerning the following question:
Here is the sample Data#!/usr/bin/perl use strict; use warnings; my $input = do { local $/; <DATA> }; my @input = split /(?=\d+ Page)/, $input; foreach (0 .. $#input) { say "Record $_ is: $input[$_]"; }
Page 1 of 1 Account Unique_Number Description GENERAL 111-111111 This is the first line I am learning perl Page 1 of 3 Account Unique_Number Description PERSONAL 222-222222 This is the first line I am learning perl Page 2 of 3 Account Unique_Number Description Educational 222-222222 This is the second line I am learning perl Page 3 of 3 Account Unique Number Description Educational 222-222222 This is the third line I am learning perl
|
|---|