Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: atm deposit problem

by tospo (Hermit)
on Jul 20, 2011 at 08:22 UTC ( #915611=note: print w/replies, xml ) Need Help??

in reply to Re: atm deposit problem
in thread atm deposit problem

or, for completeness sake and because it's frequently used:
($b) = @_;
This will be useful once you need more than one value off the list, as you can do
($a, $b, $c) = @_;
Some additional advice: get into the habit of using "strict" and "warnings" in every Perl script you write and declare variables with "my" or "our" (which should be the exception). You can quickly create a mess in a longer script simply with typos in variable names, which are not caught without using "strict". Using "warnings" will help you, among other things, to find variables you are using but have never assigned anything to. What you do in the Perl script is to put this in the top of the script:
use strict; use warnings;
Your code tries to keep a balance but there is no way of accessing it. What you are really trying to write is a "Checking" class. BTW: the name seems a bit awkward (it's not checking, it's making a transaction), always try to find a descriptive name for your packages and subroutines, if you can't find one then this might indicate that its task isn't well defined. You could explore object oriented coding to handle this in a better way or let your main script keep the balance. I hope this isn't too confusing.

Replies are listed 'Best First'.
Re^3: atm deposit problem
by Anonymous Monk on Jul 20, 2011 at 13:21 UTC

    It sounds like checking as in "checking account" (or "chequing" to make it less US and more clear).

      "less US and more clear" now, thanks :-)
Re^3: atm deposit problem
by pinnacle (Acolyte) on Jul 20, 2011 at 18:09 UTC

    Thanks all, your information much appreciated, issue resolved

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://915611]
[Perl300]: I need suggestion for a module that'll help me to send email from my perl code. I want it secure and as simple as possible.
[Perl300]: I found from Super Search
[Perl300]: I found from Super Search, Net::SMTPS or Net::SMTP, MIME::Lite, Email as options
[1nickt]: Perl300 Try Email::Stuffer
[1nickt]: Or for a little more control, Email::Sender:: Simple
[Perl300]: any suggestion on which one might be secure and simplest. I am not doing anything complex, just check some conditions from DB tables and send email to myself (same domain) if conditions are met
[1nickt]: read the doc of the suggestions I just gave
[1nickt]: A lot depends on whether you are sending mail from your local box or using a remote server
[hippo]: Secure in what sense?
[Perl300]: I am sending from remote server

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2017-10-17 15:51 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (233 votes). Check out past polls.