Question #53626

Write the following expression using a shortcut:
$y = $y + 5;
1

Expert's answer

2015-07-24T02:51:05-0400

Question #53626, Programming, Perl, for completion

Write the following expression using a shortcut:

$y = \$y + 5$;

Answer:


$y += 5;


The original example with corrected syntax and formatting (for context):


$y = 0;
while (<>) {
    $y += 5;
    print "$y\t$_";
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS