Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl Style: About error messges opening files

by Abigail-II (Bishop)
on Apr 27, 2004 at 14:19 UTC ( #348496=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Perl Style: About error messges opening files
in thread Perl Style: About error messges opening files

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


Comment on Re: Perl Style: About error messges opening files
Select or Download Code
Replies are listed 'Best First'.
Re: Re: Perl Style: About error messges opening files
by flyingmoose (Priest) on Apr 27, 2004 at 14:23 UTC
    A'ight, thanks! ... that explains a lot!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://348496]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2015-07-30 04:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls