Hi,
i have a file <fileP>:
y w
y u
y t
y s
y r
x w
x u
x t
x s
x r
w v
w p
v u
v t
v s
v r
u t
u s
u r
u p
t s
t r
t p
s r
s p
r p
q p
And my Q.! How can i transform this file to <fileTrans>:
10 8
10 6
10 5
10 4
10 3
9 8
9 6
9 5
9 4
9 3
8 7
8 1
7 6
7 5
7 4
7 3
6 5
6 4
6 3
6 1
5 4
5...
Big thank's,justice41 !
$cnt{$_}++ foreach map { /^(.)/ } @tmp, @T;
In a result this variant is put as basic. While on several examples of problems has not arisen. All works correctly. All best for you!
...and than's for comments,
best regards,
Al.
hi,
i am sory for recurrence of the question, but while i can not create a code for the decision.
The essence of a task is shown below on an example.
INPUT: file <RES>
======
x s_inv u 1 1 0 99
x r t_inv 1 1 0 99...
justice41's,
------------
i have admitted a mistake...my mistake!!!
your code:
#########################################################
@T=();
open (FH4,"<RESULT_SORT");
while (<FH4>) {
my %cnt = ();
my @tmp = /^(\S+)\s+(\S+)\s+(\S+)/; # Grab first...
!justice41's,
1. HUGE thank!
2. All is correct!
3. the words at me are not present
4. large gratitude to you!
5. yours faithfully.
PS: this question is closed
AL.
....
Sorry, may be my explain so worse...
Concept 'unique' for me it:
first three elements do not repeat in the subsequent two (n) lines.
For an example, we can use my "dream"/ideal output:
=====================================================
x...
Goog day,
Excuse me! and large thank for the response!!!!
By the reason to that my intolerable English... :) :(
So,
I have file (<RES>)of the following structure:
INPUT:
======
x s_inv u 1 1 0 99
x r t_inv 1 1 0 99...
Hi!
I have some q.!
See the example pls.
file "RES":
@T=();
x u y_inv 1 1 0 14 ===> i need
==>@T=("x","u","y_inv");
x s_inv t 1 1 0 14
v r_inv u 1 1 0 14==>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.