Option -C in dem Shebang

28/01/2009 - 20:35 von Tim Landscheidt | Report spam
Hallo,

wie bringe ich eine Option -C in dem Shebang unter? Erfolg-
lose Versuche:

| [tim@lockfix ~]$ perl --version

| This is perl, v5.10.0 built for i386-linux-thread-multi

| [...]

| [tim@lockfix ~]$ echo '#!/usr/bin/perl -pw0777' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -C -pw0777' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Unknown Unicode option letter ' '.
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -CS -pw0777' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Unknown Unicode option letter ' '.
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -CSL -pw0777' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Unknown Unicode option letter ' '.
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -pw0777 -C' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Too late for "-C" option at /var/tmp/test.pl line 1.
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -pw0777 -CS' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Too late for "-CS" option at /var/tmp/test.pl line 1.
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -pw0777 -CSL' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Too late for "-CSL" option at /var/tmp/test.pl line 1.
| [tim@lockfix ~]$ echo '#!/usr/bin/perl -CSL' > /var/tmp/test.pl && chmod +x /var/tmp/test.pl && /var/tmp/test.pl < /dev/null
| Too late for "-CSL" option at /var/tmp/test.pl line 1.
| [tim@lockfix ~]$

Besten Dank,
Tim
 

Lesen sie die antworten

#1 Moritz Lenz
28/01/2009 - 20:55 | Warnen spam
Tim Landscheidt wrote:
Hallo,

wie bringe ich eine Option -C in dem Shebang unter? Erfolg-
lose Versuche:



Gar nicht.

Aus `perldoc perlrun':

Note: Since perl 5.10.0, the -C option can no longer be used on
the #! line. It wasn’t working there anyway, since the standard
streams are already set up at this point in the execution of the
perl interpreter. You can use binmode() instead to get the
desired behaviour.

Grüße,
Moritz


Moritz Lenz
http://perl-6.de/ http://moritz.faui2k3.org/

Ähnliche fragen