array searching

J

jimcanon

Hi,

This is my first question, I appreciate any information you provide. I
want to compare the numbers after : in @jn to the numbers after job in
@job1 and @job2.


@jn =
JN.2007:555
JN.2007:8433
JN.2007 :594
JN.2007:111
JN.2007:4663
JN.2007.321
JN.2007:2221


@job1 =
job555
job572
job8433
job873
job594
job4663
job2221
job2223

@job2 =
job555
job8433
job873
job594
job4663
job2221
job2223

I want to put what is missing in @jn compared to @job1 and @job2 in
@jobMissing :

job572
job873
job2223

I want to put what is missing in @job1 and @job2 compared to @jn in
@jnMissing :
job111
job321


Thanks and Regards,
Jim
 
J

Jürgen Exner

This is my first question. [...]

But it has been asked before.
want to compare the numbers after : in @jn to the numbers after job in
@job1 and @job2. [...]
I want to put what is missing in @jn compared to @job1 and @job2 in
@jobMissing :
I want to put what is missing in @job1 and @job2 compared to @jn in
@jnMissing :

perldoc -q intersection:
"How do I compute the difference of two arrays? How do I compute the
intersection of two arrays?"

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,290
Messages
2,571,453
Members
48,131
Latest member
AntoniaSep

Latest Threads

Top