Respected GrandFather,

Thank you once again for the updates. I will surely follow up on the valuable suggestions you have provided. As usual, your suggestions are loaded with stuff that's completely new to me, and some stuff seems quite dense to absorb at first go for a newbie like me. But without guidance of you great folks here at PerlMonks, this would be a very difficult journey. You took time out of the Chrismas Vacations to reply to my query, this fact itself speaks volumes of the ever helping nature of the PerlMonks.

I ran the code you provided and found that certain outputs were different. But thats ok, I will work through these.

Basically, I had put the validation in the IF loop and put the actual execution in the ELSE loop because, if I dont do that and enter 10:00:00:00:c9:ab:cd:ef in prompt "a" where a user is supposed to enter WWN without ":", then I get "10::0:0::00::0:0::c9::a:b::cd::e:f". Notice the "::". I wanted the script to check in the beginning itself if the input contains ":", or if input contains non hex characters or if the input characters are less or more than the number of WWN elements.

Similarly in option "b", if user enters a non hex WWN or a WWN that has anything else than Hex or ":", I wanted to throw an error message which is again why I have entered the checking part in the IF loop and the actual execution in the ELSE Loop

I never thought that programming in Perl will be so much fun...heck, now its sort of getting a little addictive, I keep thinking of ways to make my script better. Actually, its not a big deal for you guys to write scripts like these, but for me, this script means a lot. :)

Perlpetually Indebted To PerlMonks


In reply to Re^2: Script to convert HBA WWNs to lowercase and add ":"[Updated] by perl514
in thread Script to convert HBA WWNs to lowercase and add ":"[Updated] by perl514

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.