On 14 abr, 13:25, [EMAIL PROTECTED] (Chas. Owens) wrote:
[...]
Hmm, the following works for me, but then again I have
export PERL_UNICODE=SDL #Make Perl use UTF-8 for IO
in my .bash_profile.
Yes, that made the trick. Thanks. But I wish there was a Perl only
way...
--
To unsubscribe,
On Mon, Apr 14, 2008 at 1:21 PM, Paulo Antonio
[EMAIL PROTECTED] wrote:
On 14 abr, 13:25, [EMAIL PROTECTED] (Chas. Owens) wrote:
[...]
Hmm, the following works for me, but then again I have
export PERL_UNICODE=SDL #Make Perl use UTF-8 for IO
in my .bash_profile.
Yes,
Hi all,
I'm trying to change case of UTF-8 strings. I've read a bunch of
documentation, but can't figure out how to do it right. Here is an
example:
=== My code:
use strict;
use utf8;
my $line;
my $letter;
while ($line = STDIN) {
chomp($line);
utf8::upgrade($line);
$line =
On Apr 14, 2008, at 10:10, Paulo Antonio wrote:
Hi all,
I'm trying to change case of UTF-8 strings. I've read a bunch of
documentation, but can't figure out how to do it right. Here is an
example:
=== My code:
use strict;
use utf8;
my $line;
my $letter;
while ($line = STDIN) {
--- zsdc [EMAIL PROTECTED] wrote: *Please* CC the mailing
list when you answer. I'm
writing it so everyone
on the list could learn something, not just to fix
your program or solve
your particular problem.
thanks for the reminder zsdc - i should have
remembered to cc the list when
bis wrote:
#!/usr/bin/perl -p
s/(\s)(.)/$1\u$2/g if/SCTN:/;
This capitalises the first letter of every word in
the whole document.
No, it doesn't. Only the lines containing SCTN:
Have you run it?
yes i have run it and below is the kind of output i
get (original input all lower case except
James Edward Gray II wrote:
On Friday, August 22, 2003, at 05:06 PM, bis wrote:
Thanks Gabriel - your suggested code
s/(SCTN:\s*)(\w+)/$1\u$2\E/g;
[...]
Well, let's see if we can get a little closer:
s/(SCTN:\s*)(.+)$/join '', $1, map { ucfirst $_ } split /( )/, $2/ge;
See if that helps any.
On Saturday, August 23, 2003, at 02:34 AM, zsdc wrote:
s/(SCTN:\s*)(.+)$/join '', $1, map { ucfirst $_ } split /( )/, $2/ge;
See if that helps any.
It gives a syntax error. Maybe try this:
Sorry, I forgot to backwack those /. My fault for not testing the
code. I'll try again:
*Please* CC the mailing list when you answer. I'm writing it so everyone
on the list could learn something, not just to fix your program or solve
your particular problem.
bis wrote:
Tnaks zsdc and JEGII.
--- zsdc [EMAIL PROTECTED] wrote:
It gives a syntax error. Maybe try this:
I want to make the case of the first letter of all the words in a
selected string to upper case. The code
s/\b(\w+)/\u$1\E/g;
enables me to do this for the whole document.
But the string I want to match and operate on is all instances of
text following the string
SCTN:
as in
SCTN: News
Bis wrote:
I want to make the case of the first letter of all the words in a
selected string to upper case. The code
s/\b(\w+)/\u$1\E/g;
enables me to do this for the whole document.
But the string I want to match and operate on is all instances of text
following the string
SCTN:
as in
SCTN:
Bis [EMAIL PROTECTED] wrote:
I want to make the case of the first letter of all the words in a
selected string to upper case. The code
s/\b(\w+)/\u$1\E/g;
enables me to do this for the whole document.
But the string I want to match and operate on is all instances of text
following the string
Bis wrote:
I want to make the case of the first letter of all the words in a
selected string to upper case. The code
s/\b(\w+)/\u$1\E/g;
enables me to do this for the whole document.
But the string I want to match and operate on is all instances of
text following the string
SCTN:
Thanks Gabriel - your suggested code
s/(SCTN:\s*)(\w+)/$1\u$2\E/g;
is an improvement - it does capitalise the first
letter - but only of the first word after SCTN: so
i get something like
SCTN: This is a section name
What I need is
SCTN: This Is A Section Name
hope that makes sense! :)
On Friday, August 22, 2003, at 05:06 PM, bis wrote:
Thanks Gabriel - your suggested code
s/(SCTN:\s*)(\w+)/$1\u$2\E/g;
is an improvement - it does capitalise the first
letter - but only of the first word after SCTN: so
i get something like
SCTN: This is a section name
What I need is
SCTN:
this *should* work:.
__ START __
my $path = qq~/home/phisher/documents~; # set this to your path
opendir(DIR,$path) or die(can't readdir $path: $!); # open the entire
directory for getting the contents of
while (my $file = readdir DIR) { # $file gets assigned the next value of
DIR, and exits when
try this..
__ START __
my $path = qq~$HOME/documents~; # set this to your path
opendir(DIR,$path) or diesub(can't readdir $path: $!); # open the entire
directory for getting the contents of
while (my $file = readdir DIR) { # $file gets assigned the next value of
DIR, and exits when there's no
Hi,
I'm trying to figure out how I can change the filenames in a directory, from
having an initial capital letter, to all lowercase. The files came from
a Windows system, which doesn't really care about case. My BSD box, however,
does !
I've tried fiddling around with tr and lc, but I don't
18 matches
Mail list logo