perl regex vs text editor syntax

2010-02-27 Thread jbl
I am having trouble with a regex in perl. I have an array that looks like this: Abilene,KS,67410,1019 2000 Ave,38.88254,-97.20204,Grant Town Fire Dist *Arlington,KS,67514,100 W Main St,Reno County Fire Dist 4 Abilene,KS,67410,1463 3325 Ave,39.079136,-97.1181,Sherman Township Fire District *Beattie,

initialize and modify a string at the same time

2010-02-18 Thread jbl
(sorry if there is a duplication, I tried posting this with my newsgroup client and it has never showed up) I need three versions of a string ($city) (In case EAST BANK is entered) (1) capitol first (cowboy case)East Bank (2) Any spaces present changed to undersccore

Regex problem

2009-12-21 Thread jbl
t I was wondering what I am doing wrong here Thanks jbl #!/usr/bin/perl -w use strict; open MY_OUTPUT_FILE, "> Export_Output_mod.txt" or die "Can't write to out.txt: $!"; while ( defined ( my $line = ) ) { $line =~ s/(\s)243 /$1243rd /g; print MY