in reply to atm deposit problem
chomp your input.
That problem recurs within your script, but isn't the issue.
Also, deposit() is in a different package (ie, a different namespace). It needs to either be exported into the main:: namespace, or called by its fully qualified name. (Bah, you are calling by its fully qualified name. lol)
The real problem however is this line: $b = @_; Evaluating an array in scalar context will assign to $b the number of elements in @_. Try $b = shift;, or $b = $_[0].
Updated to discuss deposit() function.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: atm deposit problem
by tospo (Hermit) on Jul 20, 2011 at 08:22 UTC | |
by Anonymous Monk on Jul 20, 2011 at 13:21 UTC | |
by tospo (Hermit) on Jul 20, 2011 at 13:57 UTC | |
by pinnacle (Acolyte) on Jul 20, 2011 at 18:09 UTC |