Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: atm deposit problemby davido (Cardinal) |
on Jul 20, 2011 at 02:10 UTC ( [id://915566]=note: print w/replies, xml ) | Need Help?? |
chomp your input. That problem recurs within your script, but isn't the issue.
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
In Section
Seekers of Perl Wisdom
|
|