Got great help earlier, now have a couple of questions.
QUESTION #1
file1 data:
# This is a list of selected nets
Net 'GROUND' top side
Net 'GROUND' bottom side
Net '/ad1' top side
Net '/ad1' bottom side
Net '/VCCA' top side
Net '/VCCA' bottom side
a. I need to seek all lines that has the word "Net" in file1
b. remove lines that contain duplicates found in the 2nd column only, so that it outputs to file called "file2"
to look like below:
'GROUND'
'/ad1'
'/VCCA'
Question #2
How can I take a file like "file2" and have perl read the
column and strip out any lines in another file that are contained in the file2 listing?
While I have similar scripts written in UNIX (Korn), I'm trying to learn PERL's eqivalent code.
Thanks... RCP
edit by thelenm: added tags.
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.