chris charley charleypulsenetcom original message remy guo newsgroups perlbeginners perl beginners sent tuesday august 05 2008 1014 pm subject question text operation using regex hi txt log file want delete 9th character line using regexthanks remy ooops sent poster mistake could command line perl pe 8 length substr _8 1 logfiletxt altered_filetxt chris clarify substr function following 1 2 single quotes assigns empty dtring 9th position string effectively eliminating 9th character chris thanks chrisbut solution put script remy yes remy please keep replies group everyone see learn open log somefilelog die unable open file log substr _8 1 could use regex approach s81 whatever print etc may use either two solutions substr regex however use regex perl start regex engine overhead ie time involved record original answer one perl pe 8 length substr _8 1 logfiletxt altered_filetxt perl pe 9 length substr _8 1 logfiletxt altered_filetxt 9 accounts newline taking length line chris unsubscribe email beginnersunsubscribeperlorg additional commands email beginnershelpperlorg httplearnperlorg wed 06 aug 2008 085719 0400 question text operation using regex