Advertisement

10.21.2007 at 01:22PM PDT, ID: 22907774
[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!

9.0

Newbie Perl syntax questions

Asked by Kapusta in Perl Programming Language

Tags: , , ,

I am not a Perl programmer, but have inherited some Perl code that is running on our server.  I am familiar with Pascal and BASIC, so I know how to program.  I'm trying to document the source code and did not want to spend hours googling the web hoping to find Perl syntax guides.  Perhaps someone would be kind enough to explain in simple English what the following lines of code do?   What follows is not the exact source code, but lines of code snatched here and there which I do not understand. What exactly does each section do (each section separated by a blank line)

umask( 022 );

$| = 1;

my $Id;

chop;

$UPass = unpack( 'u', $UPass );

s/\$([a-zA-Z0-9_]+)/$Values{$1}/g;

$UserUniq = $_[0];
$UserStatus = $_[1];
$UserStep = $_[2];
$NumQuest = $_[3];

$UueRandomMask =~ s/\n//g;

$OneOfRightAnswers =~ s/^ *//;
$OneOfRightAnswers =~ s/ *$//;


$AnswerNum = 0;
foreach $OneOfAnswers ( split( / /, $RandomOrder ) ) {
      $AnswerNum++;
      $RealUserAnswer = $OneOfAnswers if( $UserAnswer == $AnswerNum );
};
$TextUserAnswer = $Answers{ $RealUserAnswer };
$RightAnswers{ $QuizRightAnswer } = 1;


if( m/^Q:/ ) {
      $CurrentQuestion++;
      last if( $CurrentQuestion > $UserStep );
};

...
    } elsif( $CurrentQuestion == 0 && ! m/&:/ ) {
      s/\r//;
    };

$HtmlTitle = browser_escape( $Title );

my $string = shift;
$string =~ s/([<&"#%>])/sprintf ('&#%d;', ord ($1))/ge;

Start Free Trial
[+][-]10.21.2007 at 07:59PM PDT, ID: 20120498

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl, syntax, htmltitle, questions
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 1
Solution Grade: B
 
 
[+][-]10.21.2007 at 08:47PM PDT, ID: 20120701

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628