in reply to Re^3: result is not listening to if
in thread result is not listening to if

Ok Thank you, so if I understand correctly, if I want to make sure Perl interprets my value as a number I need to not put quotes around it?

Replies are listed 'Best First'.
Re^5: result is not listening to if
by hippo (Archbishop) on Jul 14, 2017 at 14:37 UTC

    It's a bit more nuanced than that because, as I say, Perl isn't strongly typed. However it's still something I would encourage as good practice because:

    1. It makes your intention in the code very clear
    2. It will certainly make a difference when you start working in bases other than decimal
    3. It doesn't hurt

    While learning you can always try quick one-liners to see what happens when you try something. Feel free to experiment on your own. If you see behaviour you don't understand try to find it in the documentation or ask about it here.