in reply to Re: No output to screen or output file
in thread No output to screen or output file

Dont I have to format my code with those single quotations when comparing string values? For that reason, I have the program check and differentiate between strings and numerical values (string or num) - I posted a question earlier and the solution to my problem was to include these single quotations. I believe I kept getting an error when trying to run the program without them.

  • Comment on Re^2: No output to screen or output file

Replies are listed 'Best First'.
Re^3: No output to screen or output file
by chromatic (Archbishop) on Jul 24, 2012 at 19:04 UTC

    Here's the quick explanation. What does this piece of code mean?

    my $result = something;

    Is something a function call? Is it a string literal?

    You have to make your intent clear to Perl and to human readers. Make it unambiguously a function call with:

    my $result = something();

    ... or a string with:

    my $result = 'something';

    Where it's not obvious what you mean, make it obvious. That's what strict was complaining about.


    Improve your skills with Modern Perl: the free book.