Loading ...
Sorry, an error occurred while loading the content.

alphabet letters print

Expand Messages
  • ponni
    Hi Experts, I am a beginner, i have strucked to print the alphabet letters one below one using perl. Can anybody give suggestion on this! Thanks Pon ilavarasu
    Message 1 of 2 , Sep 11, 2012
    • 0 Attachment
      Hi Experts,

      I am a beginner, i have strucked to print the alphabet letters one below one using perl. Can anybody give suggestion on this!

      Thanks
      Pon ilavarasu
    • David Precious
      ... print join n , ( a .. z ); .. is the useful range operator. It works for numbers too. There are of course other ways to write the above. Another could
      Message 2 of 2 , Sep 11, 2012
      • 0 Attachment
        ponni <pons_84@...> wrote:

        >Hi Experts,
        >
        >I am a beginner, i have strucked to print the alphabet letters one
        >below one using perl. Can anybody give suggestion on this!

        print join "\n", ('a'..'z');

        '..' is the useful range operator. It works for numbers too.

        There are of course other ways to write the above.

        Another could be:

        print map {"$_\n"} 'a'..'z';


        >
        >Thanks
        >Pon ilavarasu
        >
        >
        >
        >------------------------------------
        >
        >Unsubscribing info is here:
        >http://help.yahoo.com/help/us/groups/groups-32.htmlYahoo! Groups Links
        >
        >
        >
        --
        Sent from my Android phone with K-9 Mail. Please excuse my brevity.
      Your message has been successfully submitted and would be delivered to recipients shortly.