At 23.03 -0400 1999.04.12, Rick wrote: >ok, i have another question if you guys would be so kind to help me >out... When i have MacPerl get a text document from the web for instance >and save it, it is in unix format with unix CRs (\r) which the mac >doesn't use. how do i convert the document to mac format (\n). i tried: > >while(<FILE>) { > $_ = s/\r/\n/g; > } > > >but it doesn't work. please help. (Two notes: Unix newlines are LF, not CR, and $_ is always redundant before a =~). The short answer is s/\012/\n/g; what you have should work (since in MacPerl, \r is the same as \012). What do you mean "it doesn't work"? You might be best off reading man perlport, which comes with perl5.005, and someday will come with MacPerl. http://pudge.net/macperl/perlport.html http://pudge.net/macperl/perlport.pod There's a whole section on newline issues. Hope it helps, -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org