On Jun 26, 9:57 am, [EMAIL PROTECTED] (Pat Rice) wrote:
> Hi all
> I'm wondering if there is a nice way to parse this data, as in is
> there any module that could handle this type of data, as in the was it
> is presented? so that I can repeat is itn a tree like structure in
> HTML ?
>
> so I can pi
"Pat Rice" schreef:
> I'm wondering if there is a nice way to parse this data, as in is
> there any module that could handle this type of data, as in the was it
> is presented? so that I can repeat is itn a tree like structure in
> HTML ?
Maybe you are looking for something like this:
#!/usr/bin
Sorry for the multiple replies... This code works. Though I think I
might be doing something "bad". When I comment out the line:
$curNode->{ $nodeName }{ '__PARENT__' } = $curNode;
after the loop, %root is an empty hash. I'm not sure why.
#!/usr/bin/perl
use strict;
use warnings;
use Data::D
This code is a start. It needs some playing with, still.
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
open my $FH, "< t" or die;
my %root = ();
my $depth = 0;
my $curNode = \%root;
while ( my $line = <$FH> )
{
chomp $line;
$line =~ /^(\s*)/;
my $leadingSpace = lengt
On Thu, Jun 26, 2008 at 9:57 AM, Pat Rice <[EMAIL PROTECTED]> wrote:
> Hi all
> I'm wondering if there is a nice way to parse this data, as in is
> there any module that could handle this type of data, as in the was it
> is presented? so that I can repeat is itn a tree like structure in
> HTML ?
>
On Thu, Jun 26, 2008 at 11:53 PM, Jeff Peng <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 26, 2008 at 9:57 PM, Pat Rice <[EMAIL PROTECTED]> wrote:
>>
>> \==+Interface :
>>|Link State.Down
>> \==+SCSI Interface :
>
> Is this the info in
On Thu, Jun 26, 2008 at 9:57 PM, Pat Rice <[EMAIL PROTECTED]> wrote:
>
> \==+Interface :
>|Link State.Down
> \==+SCSI Interface :
Is this the info in a text file?
If so I think you must parse it by hand, after that you create the
Hi all
I'm wondering if there is a nice way to parse this data, as in is
there any module that could handle this type of data, as in the was it
is presented? so that I can repeat is itn a tree like structure in
HTML ?
so I can pic out the tree like structure and replicate it in some way
so that I