nithins has asked for the wisdom of the Perl Monks concerning the following question:

hi monks, How to create a rupee symbol with perl code and print it on screen or file ??. i tried with utf8 decode thing but it didn't worked .can somebody show me the way on this thanks

Replies are listed 'Best First'.
Re: How to get a Indian Rupee symbol?
by McA (Priest) on Mar 14, 2013 at 07:35 UTC
    use Encode qw(encode); print encode("UTF-8", chr(0x20B9));

    McA

Re: How to get a Indian Rupee symbol?
by choroba (Cardinal) on Mar 14, 2013 at 09:48 UTC
    Crossposted on StackOverflow. It is considered polite to inform about crossposting so people not attending both the sites do not waste their time solving a problem aready solved at the other corner of the Internet.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: How to get a Indian Rupee symbol?
by Discipulus (Canon) on Mar 14, 2013 at 08:59 UTC
    welcome to Babel!

    please consider reading The minimum about Unicode to know the minimum about babel.

    Anonymous probably meant  perl -CSD instead of  perl -MCSD see CSD for perl wonderful switches.

    L*
    there are no rules, there are no thumbs..
Re: How to get a Indian Rupee symbol?
by Anonymous Monk on Mar 14, 2013 at 07:41 UTC
      perl -MCSD ...

      Where is CSD?


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        :) its supposed to be -CSD
Re: How to get a Indian Rupee symbol?
by nithins (Sexton) on Mar 15, 2013 at 08:57 UTC

    Hi there, Well i have tried all the above but i was not able to get the symbol.Is it because i am working on a perl 5.8.8, 2006 ?? or is there any other reasons??.

Re: How to get a Indian Rupee symbol?
by nithins (Sexton) on Mar 15, 2013 at 10:14 UTC

    hi monks, sorry for the above comment. its working :)