Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • You need a semi colon after the use statement.
    Without that you only have one statement:

    #!/usr/bin/perl
    use strict   print "Hello World\n"


    The return of the print statement is 1 (unless it fails).
    This effectively changes it into use strict 1.0 , whereby the module is required to be at least version 1.0

    Of course your code should look like this:

    #!/usr/bin/perl
    use strict;
    print "Hello World\n";
    • That was the precise point, the fact that the code would work some of the times without the semicolon :-)

      The part of the version one was taken care of pretty quickly [perl.org], but it took Aristotle [perl.org] to find out the reason for the exceptions [perl.org] (that is, modules below version 1 working and vice-versa).

      You wouldn't believe how ashamed of myself I am for not having solved the problem before posting it... oh well, one learns new things everyday :-)

      Anyway, if that's what it takes to bring a new user [perl.org] to the site, you ca