On Thu, 2009-01-08 at 18:23 -0800, Erik Witkop wrote:
> Here is what I am trying to do,
> 
> I want to grep on a semicolon, and then upper case the next character.
> 
> So if my input data is in the format of
> 
> Witkop; erik
> 
> I want to find the semicolon and then uppercase the 'e' in erik.
> 
> Any help?
> 
> 

#!/usr/bin/perl

use strict;
use warnings;

my $text = 'Witkop; erik';
$text =~ s{ ( \; [^[:alpha:]]* ) ( [[:alpha:]] )}{$1\U$2}gmsx;
print "$text\n";


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication as it is about 
coding.

"It would appear that we have reached the limits of what it is possible to 
achieve with computer technology, although one should be careful with such 
statements, as they tend to sound pretty silly in 5 years."
  --John von Neumann, circa 1950



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to