in reply to Re^4: Warning for "unused sub declarations"?
in thread Warning for "unused sub declarations"?
There's never any GOOD reason to go leaving parens out. Not on maintained code, anyway.
Really? Are you sure?
open IN, '<', $infile or die "Cannot open infile: $!\n"; my $foo = <IN>; print "The foo value is " . $foo . ".\n";
Or would you prefer to see it this way...
((open(IN, '<', $infile)) or (die "Cannot open infile: $!\n")); ((my $foo) = <IN>); (print(("The foo value is " . $foo) . ".\n"));
As someone who has programmed in lisp, I can handle working with code like that, but it's not the most clear and Perlish style available. Some of those (parens (aren't (strictly (necessary)))), because the order of some operations is so well-established and obvious that the code is clear without them.
|
|---|