in reply to Re^2: Useless use of a constant (ict) in void context
in thread Useless use of a constant (ict) in void context

Interestingly, line 3 is use 5.006;.

Replies are listed 'Best First'.
Re^4: Useless use of a constant (ict) in void context
by mje (Curate) on Nov 15, 2013 at 13:56 UTC

    If I delete the use 5.006; so it is now as below, it now gives:

    package Test::NoWarnings; use strict; use warnings; use Carp ();

    Useless use of a constant (rnings) in void context at I:/strawberry-perl-5.14.2. 1-32bit-portable/perl/vendor/lib/Test/NoWarnings.pm line 3.

Re^4: Useless use of a constant (ict) in void context
by taint (Chaplain) on Nov 15, 2013 at 14:02 UTC
    At the risk of sounding offensive (not intended). If you typed your code the way you typed your question:

    strawberry-perl-5.14.2.1-3 2bit-portable/perl/vendor
    (note the 2bit-portable).

    I'm inclined to go with Rolf (LanX), and suggest it was probably a typo.

    Again. No offense intended.

    --Chris

    #!/usr/bin/perl -Tw
    use Perl::Always or die;
    my $perl_version = (5.12.5);
    print $perl_version;

      That was cut and pasted from a windows terminal and it seems it cut the newline and replaced it with a space - I don't usually use Windows. Anyway, the code in question was not typed in by me.

      If I comment out the "Package Test::Nowarnings;" line and retype it the problem goes away but I cannot see any difference between the original and what I typed. I'd run it through od if this wasn't Windows.

        Speaking of "cut and paste", Is it remotely possible you have an embedded character in your code somewhere. High ASCII, a   ( ), bell, or some other such thing. That your editor doesn't show?

        Just a thought.

        --Chris

        #!/usr/bin/perl -Tw
        use Perl::Always or die;
        my $perl_version = (5.12.5);
        print $perl_version;