Advertisement

05.12.2006 at 09:30PM PDT, ID: 21849136
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Ascii "chr" function - ignore?

Tags: ascii, perl
I've got the following script:
#!/usr/bin/perl
        my @a = ();
        while ($line = <>) {
        while (@a) {
        pop @a;
        }
        chomp $line;
        while ($line =~ m/^([\d]+)[\D]/) {
        push @a, $1;
        $line =~ s/($1).//;
        }
        push @a, $line;
        for ($x = 0; $x < $#a; $x++) { print chr($a[$x]); }
        print chr($a[$x]), "\n";
}

Which converts dot seperated ascii values like the following to plain-text
7.101.120.97.109.112.108.101 = example  (there are 7 chars in the word example)
and 7.101.120.97.109.112.108.101.10.115.101.114.118.105.99.101.49.48.49 equates to example service101 (as example is 7 chars long, and service101 is 10 chars)
The problem is that when the char_count is a "9" or a "10", in ascii those are Horizontal Tab and Line feed respectively. I'm actually very positive I won't need any ascii code below 32 (if there are any, aside from 9&10)
Actually we can eliminate the "char_count" seperator and replace it with a space in the output or as ascii before the conversion I guess.

So the output of  9.116.101.115.116.105.110.103.49.50.9.116.101.115.116.105.110.103.49.50  would convert to "testing12 testing12" rather than "testing12testing12" note the space placement.

Again I don't need any ascii value 0-31 to be translated via "chr" anything below 31 can simply be converted to a space.
9.116.101.115.116.105.110.103.49.50.9.116.101.115.116.105.110.103.49.50    (testing12 testing12)
10.116.101.115.116.105.110.103.49.50.51    (testing123)
11.100.105.100.45.105.116.45.119.111.114.10710.116.101.115.116.105.110.103.49.50.51
10.116.101.115.116.105.110.103.49.50.50.9.116.101.115.116.105.110.103.49.50
reference http://xinn.org/Css-Rosetta-Stone.html

thanks!
-rich
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: richrumble
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: A
Views: 114
Translate:
Loading Advertisement...
05.12.2006 at 09:37PM PDT, ID: 16672575

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.12.2006 at 09:51PM PDT, ID: 16672597

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2006 at 05:28PM PDT, ID: 16675908

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2006 at 06:22PM PDT, ID: 16676015

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.13.2006 at 07:36PM PDT, ID: 16676187

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29