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

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;
  • Comment on Re^4: Useless use of a constant (ict) in void context

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

    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;

        That is a possibility but when I view it with hexl-mode in emacs with the original line commented out and my retyped first line I don't see the difference:

        00000000: 2370 6163 6b61 6765 2054 6573 743a 3a4e #package Test::N 00000010: 6f57 6172 6e69 6e67 733b 0a70 6163 6b61 oWarnings;.packa 00000020: 6765 2054 6573 743a 3a4e 6f57 6172 6e69 ge Test::NoWarni 00000030: 6e67 733b 0a0a 7573 6520 352e 3030 363b ngs;..use 5.006; 00000040: 0a75 7365 2073 7472 6963 743b 0a75 7365 .use strict;.use 00000050: 2077 6172 6e69 6e67 733b 0a75 7365 2043 warnings;.use C 00000060: 6172 7020 2020 2020 2020 2020 2020 2020 arp