hello Monks,
I have a file containing list like this
IL12::1::287,6,-17,-9,-21,-24,-15,-2,11,4,4,-15,-26,-16,-9,-18,-25,27,17,6,
IL12::1::329,-25,-18,-28,23,17,1,-3,-23,
IL12::1::1108,-8,-21,17,-25,9,-6,-15,4,
IL12::1::1536,-12,-28,23,-12,17,-25,14,19,20,
IL12::1::1591,-17,-23,-7,-19,25,25,-25,-15,-26,23,29,-12,-25,
IL12::1::803,24,-20,-24,12,8,-22,
now i want to make each line as an array and give the first one as the name of the
like this
@IL12::1::287 = ('6','-17','-9','-21','-24','-15','-2','11','4','4','-15','-26','-16','-9','-18','-25','27','17','6')
and the i want to compare 2 arrays to find the common elements in it
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.