perlquestion
saunderson
Hi all,
<p>
i wonder whether it's possible to simplify constructs like
<code>
doSthWith($test) if checkFn($test);
</code>
further, such that i have to write the variable (<code>$test</code>) only once!?
</p>
I often have to deal with such statements and i just don't want to use perl's default variable, so that it yields
<code>
$_=$test; doSthWith($_) if checkFn($_);
</code>
since <code>$_</code> is often used by other statements in the same block.
<p>
How would you monks do it the neat way?
</p>
best regards