Попробуйте это:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
undef $/;
my $line = <DATA>;
my @procedures = split /(?=PROCEDURE)/, $line;
print Dumper(\@procedures);
__DATA__
PROCEDURE LOG_ECS_MSG( MD_CURR CHAR,
MSG_TIME DATE ) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
BEGIN
INSERT INTO INFO_SERV_ECS_LOG
VALUES ( MD_CURR, MD, SVTY, ACT_DATE, ACCT, MSG_TXT, MSG_TIME);
COMMIT;
END;
END;
PROCEDURE LOG_ECS_MSG( MD_CURR CHAR,
MSG_TIME DATE ) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
IF....
INSERT INTO INFO_SERV_ECS_LOG
VALUES ( MD_CURR, MD, SVTY, ACT_DATE, ACCT, MSG_TXT, MSG_TIME);
COMMIT;
END IF
END;
Выход:
$VAR1 = [
'PROCEDURE LOG_ECS_MSG( MD_CURR CHAR,
MSG_TIME DATE ) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
BEGIN
INSERT INTO INFO_SERV_ECS_LOG
VALUES ( MD_CURR, MD, SVTY, ACT_DATE, ACCT, MSG_TXT, MSG_TIME);
COMMIT;
END;
END;
',
'PROCEDURE LOG_ECS_MSG( MD_CURR CHAR,
MSG_TIME DATE ) IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
IF....
INSERT INTO INFO_SERV_ECS_LOG
VALUES ( MD_CURR, MD, SVTY, ACT_DATE, ACCT, MSG_TXT, MSG_TIME);
COMMIT;
END IF
END;'
];