in reply to Finding lowercase letters next to uppercase letters
Update: The double colon is special in perl so if it really isn't working for you, I'd try to disambiguate /$1::$2/ using /${1}::${2}/ as in:#!/usr/bin/perl -wT use strict; my $new_type = "BookInstructional MaterialTeaching Guide"; print "Before: $new_type\n"; $new_type =~ s/([a-z])([A-Z])/$1::$2/g; print "After: $new_type\n"; =OUTPUT Before: BookInstructional MaterialTeaching Guide After: Book::Instructional Material::Teaching Guide
$new_type =~ s/([a-z])([A-Z])/${1}::${2}/g;
-Blake
|
|---|