CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
How to get block info, by info inside block

 



telekomunist
New User

Aug 21, 2010, 7:27 AM

Post #1 of 2 (273 views)
How to get block info, by info inside block Can't Post

Hello
I am trying to get information blocks to output file, by identified just block saturation parameter
for example
config.cfg (input file)
###########
HTTP
port = 80, 8080, 8008
ip = 192.168.100.34
service = iis
protocol = tcp
!
FTP
port = 23
ip = 192.168.100.43
service = filezilla
protocol = tcp
!
ABC
port = 443
ip = 195.143.2.43
service = filezilla
protocol = tcp
!
###############

As you see each configuration block ends with ! sign

I try to get info about block, entering just parameter inside block

for example
##########
ip = 195.143.2.43
###########

I need to get at output whole block from the beggining and with header
ABC
port = 443
ip = 195.143.2.43
service = filezilla
protocol = tcp

Any suggestion how it can be realized???
Please help
Thanks in advance


BillKSmith
Veteran

Aug 21, 2010, 7:49 AM

Post #2 of 2 (271 views)
Re: [telekomunist] How to get block info, by info inside block [In reply to] Can't Post

Dukeman asked a similar question earlier this week (http://perlguru.com/gforum.cgi?post=48111). Check out FishMonger's answer to it.
Good Luck,
Bill

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives