New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#!/usr/bin/perl -CO #7792
Comments
From @AbigailCreated by @Abigail"man perlrun" says: The #! line is always examined for switches as the line is It also says later on that "-CO" tells perl to assume that STDOUT to be However, given the following program: $ cat utf I would expect $ perl utf > /dev/null to be silent. But if I run it, it says: Wide character in print at utf line 2. Now, I understand that this is probably caused by STDOUT already setup Preferably, using -CO on the she-bang line should silence the warning, and Perl Info
|
From @TuxOn 7 Feb 2005 22:45:00 -0000, "abigail@abigail.nl (via RT)"
I can fully confirm this behaviour, and would suggest to forbid -C on shebang FWIW using -Co instead of -CO (for all output streams instead of just STDOUT) binmode STDOUT, ":utf8"; would be the `script' equivalent of the command line option -CO -- |
The RT System itself - Status changed from 'new' to 'open' |
From perl@nevcal.comOn approximately 2/8/2005 5:05 AM, came the following characters from
So if there is an easy 'script' equivalent to the option, why shouldn't --
|
From @AbigailOn Tue, Feb 08, 2005 at 01:05:49PM -0000, H. Merijn Brand via RT wrote:
Is that because you think -C shouldn't be able to be given on the shebang Abigail |
From @TuxOn Wed, 9 Feb 2005 01:02:35 +0100, Abigail <abigail@abigail.nl> wrote:
The first. Of course. The scripting way of doing it with binmode is so easy, well documented, and shebang command line options are not there for clarity, but for functionality For (short) scripts, maybe the only useful options for the shebang line are -- |
From @rgsH.Merijn Brand wrote:
Agreed ; forbidden as change #24070 in blead. |
@rgs - Status changed from 'open' to 'resolved' |
From @AbigailOn Tue, Mar 22, 2005 at 04:19:51PM +0100, Rafael Garcia-Suarez wrote:
:-( Abigail |
From Markus.Kuhn@cl.cam.ac.ukI used to be able to write in Perl 5.8.1 simply #!/usr/bin/perl -C at the top of the script to ensure that all I/O used by default the How do I do this now after the above "fix" broke this very useful I guess the alternative would look as clumsy as binmode STDIN, ":locale"; but sadly "man perluniintro" says that :locale does not work with |
Migrated from rt.perl.org#34087 (status was 'resolved')
Searchable as RT34087$
The text was updated successfully, but these errors were encountered: