note
halley
<p>The things you ask about are partly about style choices.
<p>Equivalent:
<code>
do_something() if <condition>;
if (<condition>) { do_something(); }
</code>
<p>Equivalent:
<code>
m[regex]
m|regex|
m/regex/
/regex/
</code>
<p>Equivalent:
<code>
"string-with-expanded-$variables"
qq[string-with-expanded-$variables]
qq/string-with-expanded-$variables/
</code>
Using qq// is common on command lines, since the shell itself may require quotes or double-quotes.
<p>Equivalent:
<code>
'string-expanding-no-variables'
q[string-expanding-no-variables]
q/string-expanding-no-variables/
</code>
All of this can be found in [http://perldoc.perl.org/perlsyn.html|perldoc perlsyn] and [http://perldoc.perl.org/perlop.html|perldoc perlop].
<div class="pmsig"><div class="pmsig-249603">
<p>--<br><tt>[ e d @ h a l l e y . c c ]</tt>
</div></div>
925009
925092