#!/usr/bin/perl ########## # Looking at pre and post increment operators and side effects. ########## use strict; use warnings; sub noop { return shift; } my $m=20; print '$m=20; ++$m + $m++ is ', ++$m + $m++, " <===== ! \n"; $m=20; print '$m=20; noop(++$m) + $m++ is ', noop(++$m) + $m++, "\n";
syntax highlighted by Perl::Tidy 20060719