Ok monks, I have another thing that I'm trying to do. I have 2 spreadsheets; we'll call them $file1 and $file2. What I'm trying to do is compare the 2 spreadsheets and return as output the lines that are not similar. I tried to use one module called csvdiff.pm and that didn't really do what I wanted and I tried some code that used while and if statements but I couldn't get anything. All I want to do is return the rows that don't match from $file2. So I would return lines 2 and 3 of $file2 from the example below. How do I need to go about accomplishing this? Oh and I forgot to mention the reason those 2 lines matched was because of the IP address within the line.
$file1 looks like ,Connectors and Reporting Devices,,,Week of 11/16-22,,,,,, Count,Agent Name,Device Address,Device Host Name,Device Product,Device + Vendor,,,1/3/2009,1/4/2009,1/5/2009 2,Syslog,10.255.33.15,name1,Switch,Cisco,,,0,0,0 2,Syslog,10.64.104.13,name2,Pix,Cisco,,,144,143,144 2,Syslog,10.64.11.52,name3,Pix,Cisco,,,2511,2043,2806 and $file2 looks like Agent Name,Device Address,Device Host Name,Device Product,Device Vendo +r,Count(Event ID) Syslog,10.64.104.12,name2,PIX,CISCO,144 Syslog,10.64.104.14,name4,Unix,Unix,46 Syslog,10.64.106.13,name5,PIX,CISCO,144

In reply to Return rows from 2 csv files that don't match by meredib

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.