Thanks Raider, but it does not seem to be working. I decided to use 'Template' as my seperator because it works better for the file I am reading, but I am still not getting what I want. Here is my new code:
my $filename = "templrep.log";
my @templates;
my $InRecSep = $\;
$\ = 'Template';
open (FILE,"/tmp/templrep.log"

or die ("Cannot open $filename: $1" );
while(<FILE>) {
push(@templates, $_);
print "$_\n";
print "------------------------------------------------------------------------------------------------------------------------------\n";
}
$\ = $InRecSep;
exit 0;
Here is a sample entry from the report I am reading:
# ----------------------------------------------------------------------------
# Template : OVIS Service Sync
# ----------------------------------------------------------------------------
SYNTAX_VERSION 4
SCHEDULE "OVIS Service Sync"
DESCRIPTION "OVIS Service Model Synchronization"
MINUTE "0,5,10,15,20,25,30,35,40,45,50,55"
SCHEDPROG "/opt/OV/VPIS/bin/vpispull.sh n2app014.hphc.org"
USER "root"
SEND_OUTPUT
SUCCESS
SET
SEVERITY Normal
MSGGRP "OVIS"
TEXT "OVIS and OVO Sync completed successfully"
FAILURE
SET
# ----------------------------------------------------------------------------
# Template : OpC User Log Maint
# ----------------------------------------------------------------------------
SYNTAX_VERSION 4
SCHEDULE "OpC User Log Maint"
DESCRIPTION "Rolls IT/O User logs"
MINUTE "0"
HOUR "1,12"
SCHEDPROG "xeq logmaint.actions.ovopc"
USER "agent.ovopc,log"
SEND_OUTPUT
SUCCESS
SET
SEVERITY Normal
MSGGRP "OpC"
TEXT "IT/O User logs for MPE/iX have been rolled."
FAILURE
SET
SEVERITY Warning
TEXT "Unable to roll IT/O User logs on MPE/iX"
# ----------------------------------------------------------------------------
# Template : PingServer
# ----------------------------------------------------------------------------
SYNTAX_VERSION 4
SCHEDULE "PingServer"
DESCRIPTION "Ping a server to see if it is up"
MINUTE "5"
SCHEDPROG "/opt/OV/scripts/PingSever N2DEV006"
USER "root"
FAILURE
SET
SEVERITY Unknown
NODE IP 155.49.113.5 "n2dev006.hphc.org"
And here is the output I am getting:
Template------------------------------------------------------------------------------------------------------------------------------
Template# Template : PingServer
Template------------------------------------------------------------------------------------------------------------------------------
Template# ----------------------------------------------------------------------------
Template------------------------------------------------------------------------------------------------------------------------------
TemplateSYNTAX_VERSION 4
Template------------------------------------------------------------------------------------------------------------------------------
Template
Template------------------------------------------------------------------------------------------------------------------------------
Template
Template------------------------------------------------------------------------------------------------------------------------------
TemplateSCHEDULE "PingServer"
Template------------------------------------------------------------------------------------------------------------------------------
Template DESCRIPTION "Ping a server to see if it is up"
Template------------------------------------------------------------------------------------------------------------------------------
Template MINUTE "5"
Template------------------------------------------------------------------------------------------------------------------------------
Template SCHEDPROG "/opt/OV/scripts/PingSever N2DEV006"
Template------------------------------------------------------------------------------------------------------------------------------
Template USER "root"
Template------------------------------------------------------------------------------------------------------------------------------
Template FAILURE
Template------------------------------------------------------------------------------------------------------------------------------
Template SET
Template------------------------------------------------------------------------------------------------------------------------------
Template SEVERITY Unknown
Template------------------------------------------------------------------------------------------------------------------------------
Template NODE IP 155.49.113.5 "n2dev006.hphc.org"
Template------------------------------------------------------------------------------------------------------------------------------
Template
I want all the stuff between each 'Template" in an array element.
Thanks, sorry for the long reply.