in reply to How to use chmod u +x in perl

From the documentation of the Perl command chmod:

The first element of the list must be the numeric mode, which should probably be an octal number, and which definitely should not be a string of octal digits: 0644 is okay, but "0644" is not.

No mention of being able to specify "u+x" or the like.

Also, having not used Unix for a while, what is the reason to mark a pdf file as executable?

Replies are listed 'Best First'.
Re^2: How to use chmod u +x in perl
by taint (Chaplain) on Nov 25, 2013 at 14:31 UTC
    "what is the reason to mark a pdf file as executable?"

    Good question. Perhaps it carries a PAYLOAD (TROJAN). ;) ;)

    Seriously. To the OP; There's precious little reason to add the x bit to a document. In fact, it could potentially cause you grief. If exposed to the wild (it's within your web space, or those other than yourself have access), it could be used in malicious ways.

    Perhaps you would find one of the following perms more suitable
    0644
    0444
    In fact, unless you actually need to alter the contents of the file. 0444 would be your best choice.

    --Chris

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