> > Why not use chop? That removes the last character. > > > > Yes, it certainly does even if the last character is not a > "\r" character. > So to do the work of one good regex substitute operator as > Lee suggested > you would have to determine some how (a regexp match operator?, a > substring to get the last character followed by a compare to see if it > was a "\r", etc.). Those two distinct operations combined > with a separate > compare step should be evaluated as an alternative to using a single > substitute operator which will remove the last character if it is > there and tell you if it did or didn't remove a "\r". Hmmm, which of > those seems like the better alternative? Do I want my script to > use four or five obtuse op codes to perform a minor function point or > do I want to use just one elegant operator do accomplish the exact > same minor function point?
Oh. I thought all the lines ended in a "\r". Sorry. R. _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs