Not at all. In fact I concede. This largely depends on the user's locale. Just in
2009/3/27 Chris Wagner <wagn...@plebeian.com> > Sorry for being contrarian here, but this is wrong. Unconditionally > blowing > away control characters is not the right way to do anything. Using Perl's > own encoding disciplines is the right way to do this. While this tr// may > work in this case and on other simple files, u just don't know what > legitimate unicode is in there that u want to keep. Especially on Windows. > > > At 09:22 AM 3/27/2009 +0900, justin.allegak...@maptek.com.au wrote: > >Here's the preferred way of opening files along with the magic tr > operator: > > > >use strict; > >use warnings; > >use Fatal qw( open ); > > > >my $file = 'msinfo.txt'; > > > >open my $FILE, '<', $file; > >while ( <$FILE> ) > >{ > > tr/\x20-\x7f//cd; > > > > print "$_\n"; > >} > >close $FILE; > > > > > >__END__ > > > > > -- > REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- > "...ne cede malis" > > 00000100 > > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs >
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs