On 7/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
snip
Is there anyway to define in perl  that the line starts host= is the
record beginning and env=<somevalue> is the record end??
snip

No, the Input Record Separator ($/) can only hold one string.
However, your records are actually separated by "\n\n", so setting $/
to "\n\n" and then chomp'ing the record will give you

"host=host1
network=10.x.x.x
ip=10.x.x.x
gw=10.x.x.1
history=history1
 some comments.. multi line with some indentation at the beginning)
loc=loc1
owner=owner1
env=env1"

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to