hi there i am trying to write a perl script to tidy up any lines in a file that don't contain alphabetic characters or single instances of character. i've noticed that the even lines are being skipped when read in eg 0,2,4,6 - the script is run on window - any ideas?
# Tidy Glossaries #!/usr/bin/perl -w open INPUT, "d:/projects/perlscripts/oc_jp.txt" or die "Can't open d:/projects/perlscripts/oc_jp.txt for reading $!\n"; open OUTPUT, ">>d:/projects/perlscripts/oc_jp_tidy.txt" or die "Can't open d:/projects/perlscripts/oc_jp_tidy.txt $!\n"; open OUTPUT1, ">>d:/projects/perlscripts/oc_jp_untidy.txt" or die "Can't open d:/projects/perlscripts/oc_jp_untidy.txt $!\n"; while (<INPUT>) { chomp($test=<INPUT>); if ( $test =~/\w/) {print OUTPUT1 "$test\n"} if ( $test !~/[A-Za-z]/) {print OUTPUT1 "$test\n"} else {print OUTPUT "$test\n"} } close INPUT; close OUTPUT; close OUTPUT1; here is 3 lines of the source file The IDM item is not available. Das IDM-Objekt ist nicht verfügbar. {0} {0} Document is offline. Dokument ist offline. Insufficient privilege. Unzureichende Rechte. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>