Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
for example and I need to rewrite it using a perl script to look likeIPADDRESS alias1 alias2 alias5 IPADDRESS2 alias3 alias4 IPADDRESS2 alias3 alias5 IPADDRESS2 alias3 alias5
Right now I have code to read the file line by line, and split that line. This new array of each line is what I need to work with.IPADDRESS alias1 alias2 alias5 IPADDRESS2 alias3 alias4 alias5
that will contain an array of arrays for example, my final masterarray should be@masterarray
Is this possible.masterarray[0] = [ IPADDRESS, alias1, alias2, alias5] masterarray[1] = [ IPADDRESS2, alias3, alias4, alias5]
I get lots of errors when trying to do what I want but I am only a starter in Perl, hopefully one of you can help me out even a little bit!!push (masterarray[0] , alias8)
holli fixed formatting
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl and arrays of arrays?
by ikegami (Patriarch) on Aug 17, 2005 at 13:48 UTC | |
Re: Perl and arrays of arrays?
by aukjan (Friar) on Aug 17, 2005 at 13:50 UTC | |
Re: Perl and arrays of arrays?
by QM (Parson) on Aug 17, 2005 at 13:50 UTC | |
by Koolstylez (Scribe) on Aug 17, 2005 at 15:26 UTC | |
by QM (Parson) on Aug 17, 2005 at 15:43 UTC | |
by Koolstylez (Scribe) on Aug 17, 2005 at 19:51 UTC | |
by QM (Parson) on Aug 17, 2005 at 20:44 UTC | |
| |
Re: Perl and arrays of arrays?
by halley (Prior) on Aug 17, 2005 at 13:47 UTC | |
Re: Perl and arrays of arrays?
by monarch (Priest) on Aug 17, 2005 at 13:49 UTC |