Question #53626

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

Expert's answer

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!

LATEST TUTORIALS
APPROVED BY CLIENTS