Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: how to calculate the length for other language content in PERL?

by vasanthgk91 (Sexton)
on May 15, 2013 at 07:31 UTC ( #1033629=note: print w/ replies, xml ) Need Help??


in reply to Re^3: how to calculate the length for other language content in PERL?
in thread how to calculate the length for other language content in PERL?

thank u very much....

use HTML::Entities; $title=decode_entities($title); my $title_length=length($title); $title=encode_entities($title);

It's working


Comment on Re^4: how to calculate the length for other language content in PERL?
Download Code
Replies are listed 'Best First'.
Re^5: how to calculate the length for other language content in PERL?
by thomas895 (Hermit) on May 16, 2013 at 06:38 UTC

    I told you :-)

    ~Thomas~ 
    "Excuse me for butting in, but I'm interrupt-driven..."

      HTML decode_entities I used previously purpose for getting length in perl. But today I have problem for that length wrong for text area value receive. I receive the text value from param that length working properly but text area receive from param..It shows wrong length for me.

      Please give a suggestion

        $release_content=$prl->trim($release_content); my $release_txt_removing_line=$release_content; $release_txt_removing_line=~ s/\n//g; $release_txt_removing_line=decode_entities($release_txt_removing_line) +; my $release_content_length=length($release_txt_removing_line); $release_txt_removing_line=encode_entities($release_txt_removing_line) +; print "==$release_content_length==";

        It's working...textarea value we need to remove the \n.Thank u

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033629]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2015-07-29 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls