If there is a #end marker
for example:
#this -data1-data2-#end #this -data3-data4-#end
you could simply split on #end,but doesn't seem like the correct methodolgy. Split (IMHO) relies on a separator,
by having a beginning and end of field identifier, it seems something more suited to putting each record on its own line, and doing
a
while(<SOANDSO>){ } loop rather than putting it all on one line and splitting it up.
If you want to split each line into its own element of an array, you could
slurp the file (provided its not too huge) or use
Tie::File
Re^2: split question
by Anonymous Monk on Jul 02, 2004 at 15:13 UTC
|
i only thought of using a split function simply because i can not think of another method to use that will simple delete:
#input xxx
...
...
#end
delete by finding /end/ and the 4 lines, delete whole entry
split was an idea? | [reply] [d/l] |