in reply to Re: Re: Sed to perl conversion-- flipping lines in a file
in thread Sed to perl conversion-- flipping lines in a file

Actually, I need it to swap lines Only if it matches a given pattern, like the sed example. I have some other lines Around the ones in the example which need to stay where they are. Where can I read more about s2p? I'm using perl on a network where they Think they've gotten rid of it-- everything I've tried so far works and compiles (when I get all the bugs fixed in my code) but I might not have everything. Thanks
  • Comment on Re: Re: Re: Sed to perl conversion-- flipping lines in a file

Replies are listed 'Best First'.
Re: Re: Re: Re: Sed to perl conversion-- flipping lines in a file
by Limbic~Region (Chancellor) on Feb 18, 2004 at 18:52 UTC
      Thanks.

      I read the online documentation. I'm wondering now if I even Have s2p on my network-- I get an error message when I try to run it on my little sed script. I can't download it myself (and remain employed, which is kind of the whole point...)

      Would I get flamed too badly if asked posted a request to convert a sed script of mine and post it where I can compare the two? I'm new here and don't want to tick any one off unecessarily. Or is there a site devoted to sed to perl issues? I didn't find anything useful on a google, but that may be a function of my own ignorance and not lack of resources.

      Thanks

        NovMonk,
        I would be really amazed if you did not have the s2p utility on your machine. Depending on your OS, it may be s2p.bat. In any case, there is no reason not to post your sed code to request help converting to perl. The key is to make sure you show some effort by showing what you have done so far.

        Cheers - L~R