develooper Front page | perl.beginners | Postings from January 2002

subroutine returning lines of text

Thread Next
From:
Martin A. Hansen
Date:
January 16, 2002 01:14
Subject:
subroutine returning lines of text
Message ID:
Pine.LNX.4.40.0201161001380.1058-100000@homer
hi

im wondering how i can make a subroutine that will return all text lines between certain marks such as START and STOP:

text file:

START
text
is here
and there
is
a
lot of it
STOP

so i would like to call the subroutine with the arguments START and STOP (because i may need more starts and stops later) and have the subroutine return the lines between START and STOP in a $.

i guess it should be pretty simple, however its out of my reach still :P

any help will be appreciated :) !

martin


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About