Re: how to do this job using perl?
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 8 Nov 2005 21:02:57 +0000 (UTC)
"sonet" <sonet.all@xxxxxxxxxxxxx> wrote in
news:dkqiin$72v$1@xxxxxxxxxxxxxxxxx:
[ Please do not top-post ]
> "sonet" <sonet.all@xxxxxxxxxxxxx> ¦b¶l¥ó
> news:dkqg48$fgs$1@xxxxxxxxxxxxxxxxx ¤¤¼¶¼g...
>> #items parent
>> 01.attr 0
>> 02.attr 0
>> 04.attr 01.attr
>> 03.attr 01.attr
>> 06.attr 02.attr
>> 07.attr 03.attr
>> 08.attr 03.attr
>> 09.attr 07.attr
>> =========================================
>> transform to this form
>> ps: The order must follow above
>> =========================================
>> 01.attr
>> 04.attr
>> 03.attr
>> 07.attr
>> 09.attr
>> 08.attr
>> 02.attr
>
>
> First, this is not a homework.
That is good.
> The Tree::Simple can do this job after i search modules in CPAN.
> But i don't want to do this by modules only if i can not slove it.
That's admirable. I think you should give it a try, and post your best
attempt. That will make it *easier* for us to help you.
> Sorry! My mother language is not english.And my english is very poor.
There is no need to apologize for poor English, especially if you post
code, because then we can figure out what you are trying to do and what
is not working by looking at the code. That is why the posting guidelines
recommend:
Speak Perl rather than English, when possible
Perl is much more precise than natural language. Saying it in
Perl instead will avoid misunderstanding your question or problem.
Do not say: I have variable with ``foo\tbar'' in it.
Instead say: I have $var = ``foo\tbar'', or I have $var = 'foo\tbar',
or I have $var = <DATA> (and show the data line).
You can find the posting guidelines at
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
Do read them, they contain invaluable pointers on how to help yourself,
and help others help you.
> Just give a suggestion.
Use a hash :) (just joking)
The question itself is a little more complicated than I can figure out
right now (which is why I personally would use the module for the
immediate problem, and then try to read the source code, or consult an
algorithms book to see how to do it).
Sinan
.
- References:
- how to do this job using perl?
- From: sonet
- how to do this job using perl?
- Prev by Date: Re: Fastcgi + boa
- Next by Date: Re: Problems with GenerateConsoleCtrlEvent and SendInput
- Previous by thread: Re: how to do this job using perl?
- Next by thread: Re: how to do this job using perl?
- Index(es):
Relevant Pages
|