in reply to sed in perl: syntax error at script.pl line 19, near “;$'”

Well, sed is a nice utility, but it is not part of Perl syntax. Other monks have mentioned that your formating is messy and makes it difficult to understand your post. You probably want to use the Perl s/// command rather than the Unix sed command.
  • Comment on Re: sed in perl: syntax error at script.pl line 19, near “;$'”
  • Download Code

Replies are listed 'Best First'.
Re^2: sed in perl: syntax error at script.pl line 19, near “;$'”
by rancho_trojan (Initiate) on May 09, 2014 at 23:20 UTC
    Ok I just added code formatting as mentioned.

      Hi rancho trojan

      Ok I just added code formatting as mentioned.
      That is good, but also did you see this statement
      ..sed is a nice utility, but it is not part of Perl syntax.. from Laurent_R?

      So for you to make your code work without any change, since it worked for you on the CLI, please check the usage of system in perl.
      You might really start thinking of doing all your work in perl like it was previously advised, instead of calling sed in perl, as you will like to do.

      If you tell me, I'll forget.
      If you show me, I'll remember.
      if you involve me, I'll understand.
      --- Author unknown to me