in reply to Re^2: text parsing
in thread text parsing

To get alphabetics, use the POSIX IsAlpha class, also it is usually easier and more maintainable to make loops into functional (based on key logic) rather than technical blocks (e.g. based on fh open state instead), for example:
use strict; use warnings; use ... etc.; my $filename = 'filename'; my $msgfront = 'MESSAGE FROM SAT: '; my $path = $ENV{ PATHNAME } . "/$filename"; open my $ifh "<$path" or die $msgfront . "$!: $filename\n"; # 'group' loop for ( $_ = <$ifh>; $_ = <$ifh> and /:IsAlpha:/; ) { chop; my ( $group, @address ) = ( $_, () ); # 'address' loop for ( $_ = <$ifh> ; $_ = <$ifh> and !/:IsAlpha:/ ) { chop and push @address, $_; } # process $group with its @address -es here } close $ifh;

-M

Free your mind