in reply to Re^2: Locator to Lat/Long code: works, but is inelegant
in thread Locator to Lat/Long code: works, but is inelegant
I just got into the habit of sub declaration, because I remember warnings being generated if you didn't.
Its all about parens. If you use parens, no warnings. You use parens :)
$ perl -le " f(1); sub f{warn@_} " 1 at -e line 1. $ perl -le " f 1 ; sub f{warn@_} " Number found where operator expected at -e line 1, near "f 1" (Do you need to predeclare f?) syntax error at -e line 1, near "f 1" Execution of -e aborted due to compilation errors. $ perl -le " sub f; f 1 ; sub f{warn@_} " 1 at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Locator to Lat/Long code: works, but is inelegant
by ForgotPasswordAgain (Vicar) on Jul 03, 2011 at 22:35 UTC | |
by Anonymous Monk on Jul 03, 2011 at 23:05 UTC |