Generate an associative array from a file
- From: Mr_Noob <gniagnia@xxxxxxxxx>
- Date: Thu, 28 Feb 2008 05:59:00 -0800 (PST)
Hi all,
here is a sample of my file :
## blah blah
[client1]
remote=192.168.1.2
### some comments here
### blah blah
[client2]
remote=192.168.1.5
passive=true
###blablah
[client3]
remote=192.168.1.8
[client4]
remote=192.168.1.15
passive=true
###
####
####
I am trying to write a perl script that would exclude all comments
from the above file and then generate an associative array, and output
the following result :
client1;192.168.1.1
client2;192.168.1.5;true
client3;192.168.1.8
client4;192.168.1.15;true
....
thanks in advance for ur help...
br
.
- Follow-Ups:
- Re: Generate an associative array from a file
- From: ccc31807
- Re: Generate an associative array from a file
- From: Peter Makholm
- Re: Generate an associative array from a file
- Prev by Date: Re: executing source command from perl
- Next by Date: Re: a very simplistic example of a perl module
- Previous by thread: executing source command from perl
- Next by thread: Re: Generate an associative array from a file
- Index(es):
Relevant Pages
|
|