#! perl -sw use strict; my $buf = ' 'x70; my $genus = \substr($buf, 40, 10); while( ) { substr($buf,0) = $_; $$genus = uc($$genus); print $buf; } #23456789012345678901234567890123456789012345678901234567890123456789 __DATA__ 00001 fox brown indian Vulpes Bengalensis 00002 fox blanford quick Vulpes Cana 00003 fox brown cape Vulpes Chama 00004 fox grey tree Vulpes Cinereoargenteus 00005 fox brown quick Vulpes Corsac 00006 fox brown tibetian Vulpes Ferrilata 00007 fox grey quick Vulpes Littoralis 00008 fox pale quick Vulpes Pallida 00009 fox brown quick Vulpes Ruppelli 00010 fox brown swift Vulpes Velox 00011 fox red quick Vulpes Vulpes 00012 fox brown quick Vulpes Zerda 00013 fox white arctic Alopex Lagopus 00014 fox Culpeo Dusicyon Culpaeus 00015 fox Grey Argentine Dusicyon Griseus 00016 fox Azara Dusicyon Gymnocercus 00017 fox small eared Dusicyon Microtis 00018 fox Sechuran Dusicyon Sechurae 00019 fox crab eating Dusicyon Thous 00020 fox Hoary Dusicyon Vetulus 00021 fox bat eared Octocyon Megalotis #### 00001 fox brown indian VULPES Bengalensis 00002 fox blanford quick VULPES Cana 00003 fox brown cape VULPES Chama 00004 fox grey tree VULPES Cinereoargenteus 00005 fox brown quick VULPES Corsac 00006 fox brown tibetian VULPES Ferrilata 00007 fox grey quick VULPES Littoralis 00008 fox pale quick VULPES Pallida 00009 fox brown quick VULPES Ruppelli 00010 fox brown swift VULPES Velox 00011 fox red quick VULPES Vulpes 00012 fox brown quick VULPES Zerda 00013 fox white arctic ALOPEX Lagopus 00014 fox Culpeo DUSICYON Culpaeus 00015 fox Grey Argentine DUSICYON Griseus 00016 fox Azara DUSICYON Gymnocercus 00017 fox small eared DUSICYON Microtis 00018 fox Sechuran DUSICYON Sechurae 00019 fox crab eating DUSICYON Thous 00020 fox Hoary DUSICYON Vetulus 00021 fox bat eared OCTOCYON Megalotis #### my %fields = ( record_num =>[0,10], characteristic_1 =>[10,10], characteristic_2 =>[20,10], genus =>[30,10], subspecies =>[40,20], ); substr($buf, @{$fields{genus}}) = uc(substr($buf, @{$fields{genus}}); #### my @str = map{ \substr($str, $_, 1) } 0..length($s)-1; $str[3] = 'b' if $str[7] eq 'N'; #### my @c = split'',$str; $c[3] = 'b' if $c[7] eq 'N'; $str=join'',@c;