Replacing "XXX" with "Name1 Name2 <name1@company.com>"

From: Tarak Parekh (tarakparekh_at_yahoo.com)
Date: 01/24/04

  • Next message: Tigerhillside: "Re: middleware, sort of (same question, different posting software)"
    Date: 23 Jan 2004 15:17:28 -0800
    
    

    Hello,

    I tried searching for this but was a little out of luck.

    Id like to replace "XXX" in a file with "Name1 Name2 <name1@company.com>".
    Its a little silly but i am doing this in perl using perl ->

    $name = "Name1 Name2"
    $login= "name1";

    system "perl -p -e \'s/XXX/$name\<$login\@company.com\>/g\' file.html > file1.html"

    The @company is getting interpreted (i guess as a variable) and i just get
    $login.com

    Can someone help me with this? I am sure there are better ways to do it too.

    thanks,
    tarak


  • Next message: Tigerhillside: "Re: middleware, sort of (same question, different posting software)"

    Relevant Pages

    • Re: mail attachment command line
      ... >>I'm looking for a simple command line to send a postscript or pdf file ... > Good luck ... If you use perl for scripting then take a look at MIME::Lite module at ...
      (comp.unix.shell)
    • Re: Perl
      ... I am playing with Perl with no luck. ... >> from the ITUG web site and I still cannot seem to get it to ...
      (comp.sys.tandem)
    • Re: perl hex editor
      ... I tried using "pack 'b*'" but I had no luck. ... Subject: perl hex editor ...
      (perl.beginners)
    • Re: Perl
      ... I am playing with Perl with no luck. ... > from the ITUG web site and I still cannot seem to get it to ...
      (comp.sys.tandem)
    • Re: Script execution blocked when reading from a socket
      ... Cygwin is another option ... > for Windows, and it implements a more complete select. ... And through some great stroke of luck, I'm using ActiveState Perl! ...
      (comp.lang.perl.misc)