I have a text file with the content as follows

SMS,SMS1,20190811,084500,servname,servid,servname1,s1,400,300,300,300, +300,300 SMS,SMSh,20190811,084500,servname,servid,servname1,s1,700,300,300,300, +300,300 SMS,SMSH,20190811,084500,servname,servid,servname1,s1,600,300,300,300, +300,300 SMS,SMSi,20190811,084500,servname,servid,servname1,s1,800,300,300,300, +300,300 SMS,SMSI,20190811,084500,servname,servid,servname1,s1,500,300,300,300, +300,300

I have written the following line of code for case insensitive string comparison

$$blk_ref = 'SMSblk' if $$blk_ref =~ /SMSi/i || $$blk_ref =~ /SMSI/i | +| $$blk_ref =~ /SMSh/i || $$blk_ref =~ /SMSH/i || $$blk_ref =~ /SMS1/ +;

But in the output file, i get the values only for SMSi,SMSh and SMS1.'The values of SMSI and SMSH are not taken.Kindly help to correct my code so that all the values are present in the output file


In reply to Case insensitive string comparison by DAN0207

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.