At 09:52 +1000 25/9/11, Charlie Garrison wrote:

Sorry!  That should probably be

#!/usr/bin/perl

on most people's systems.

Or make it more generic;

#!/usr/bin/env perl

That will use the first perl found in $PATH.

In fact for Text Filters #!perl is enough, as I've just discovered from Ronald Kimball's example, and if the filter has the .pl suffix (not needed if the shebang is there) then you don't need a shebang at all, though this may change when Barebones actually admit the phenomenon.

The shebang is, of course, needed if you need to specify a particular Perl.


At 09:52 +1000 25/9/11, Charlie Garrison wrote:

Try:

use utf8;

That tells Perl that the script itself (as opposed to input/output) is UTF8.

In this case it *is* the input and output that matter. That's why I used the line:

        use encoding 'utf-8';

which is essential. Without it, as you can tell by trying, you get raw utf-8 bytes.

'use utf8' is very different and usually does nothing at all.

JD



--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to