Jeff Westman wrote: > > I need a one-liner to convert all occurances read from a Unix pipe > of > > 'backslash' + 'literal new line (hex 0a)' > > to become just > > 'literal new line (hex 0a)' > > That is, remove the '\' only when it preceeds a new-line. Again, > this must be read from a pipe. This is what I have so far, but it > doesnt do work: > > cat dfile | perl -pe 'BEGIN { $str = ord(10); } s!\\$str!$str!g' > > Suggestions?!
cat dfile | perl -pe's/\\$//' Or just: perl -pe's/\\$//' dfile John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>