The difference between system("mkdir -p $foo")
and system mkdir => -p => $foo; is more than just
the style of commas. Single argument system is subject to shell interpretation, while multi argument system is not.
Having said that, I tend to use => to separate arguments which have totally different roles - most often to separate the first argument from the rest:
push @array => 1, 2, 3, 4;
printf "%s %6d %s" => $foo, $bar, $baz;
pack "C" => $var;
splice @array => 0, 3 => "foo", "bar", "baz";
Etc. I've used that long before people started preaching that => was some kind of pair creator. It never was, and still isn't. And I'm not the only one using this style, Larry Rosler (of GRT fame) was a vivid user of this style as well.
Abigail
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|