in reply to Re^7: perl script to search and replace comment in .aspx file
in thread perl script to search and replace comment in .aspx file

thanx temporal for you support and helping me out..but still this code is not solving my purpose.this code does not work on this type of data: <script type=main ></script> and one more problem is this code replaces all things of file after modification. also this code is not able to uncomment the commented part.

  • Comment on Re^8: perl script to search and replace comment in .aspx file

Replies are listed 'Best First'.
Re^9: perl script to search and replace comment in .aspx file
by temporal (Pilgrim) on Jun 08, 2012 at 14:21 UTC

    Oops. You will need to undef the input record seperator otherwise you will stop reading the file at the first blank line. Silly me.

    Works for me for all cases, including the one you posted =)

    Anyway, I think we can all agree that you have more than enough info on this node to be able to put together the code you're looking for. Good luck!

    Strange things are afoot at the Circle-K.

      sorry i checked it for all cases but ity's true it's not working when it founds anyblankk line . so how to prevent that.really being first perl pro it seems tough to me but through help of you guys i started learning basics of perl.thanks.:)

      isolved the problem .now it rwead the blank line but new problem is if there is a spave between two wors in same line after first space itself it discards all like: <script type>..it only reading <script and discrds type>