However, it's not necessary to enclose $name in double quotes (i.e:
-<tt>"$name"</tt>) because it's already a string. Using it byitself as
+<tt>"$name"</tt>) because it's already a string. Using it byitself as
<tt>$name</tt> will do just fine:
my $username = shift(@ARGV);
open my $pass_fh, '<', '/etc/passswd'
- or die "Cannot open /etc/passwd";
+ or die "Cannot open /etc/passwd";
while (my $line = <$pass_fh>)
<item id="qx_for_command_execution" h="`…` or qx// for Executing Commands">
-Some people are tempted to use backticks (<tt>`…</tt>) or <tt>qx/…/</tt>
+Some people are tempted to use backticks (<tt>`…</tt>) or <tt>qx/…/</tt>
for executing commands for their side-effects. E.g:
is not advisable, and should be avoided.
+A better option would be to provide methods in the containing objects to
+access those methods of their contained objects. And an even better way would
+be to structure the code so that each object handles its own domain.
<item id="delegating_parameter_passing" h="Passing parameters in delegation">
to <a href="http://php.net/manual/en/function.include.php">PHP's include</a>
or <a href="http://ss64.com/bash/period.html">the shell's
"source" or "." operators</a>. The answer is that the better way is to extract
-the common functionality from all the programs into
+the common functionality from all the programs into
<a href="$(ROOT)/topics/modules-and-packages/">modules</a> and load them by
using "use" or "require".