in reply to Call one Perl Script from another

In order to invoke inc.pl , I wrote, system ("perl /u/niveditn/perl/myfolder/inc) ==0 or die "failed !" ; But it showed compilation errors like : Backslash found where operator expected at tmp line 1, near "rtf1\" Backslash found where operator expected at tmp line 1, near "ansi\" Backslash found where operator expected at tmp line 1, near "ansicpg1252\" Backslash found where operator expected at tmp line 1, near "deff0\" Backslash found where operator expected at tmp line 1, near "f0\" Backslash found where operator expected at tmp line 1, near "froman\" Backslash found where operator expected at tmp line 1, near "f1\" Backslash found where operator expected at tmp line 1, near "fswiss\" syntax error at tmp line 1, near "rtf1\" syntax error at tmp line 1, near "f1\" syntax error at tmp line 1, near "}}" Can you please help?

Replies are listed 'Best First'.
Re^2: Call one Perl Script from another
by davorg (Chancellor) on Oct 24, 2006 at 08:57 UTC

    That sounds very much like you're trying to execute an RTF file. Are you editing your code in Wordpad? You should make sure that you save the code as plain text. I recommend getting a real programmers editor like emacs or vi.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      Hey !!! Thanks a ton!!! With notepad , I could finally call the other script!! Thanks again for helping , Cheers Bucchi
        Hey !!! Thanks a ton!!! With notepad , I could finally call the other script!! Thanks again for helping , Cheers Bucchi

        And the lesson to be learnt here is that before investigating on supposed problems with a.pl calling b.pl, one would better make sure that b.pl works fine in the first place. Again, there may better strategies than resorting to system, from using do to making the called script into a real module. But this is probably stuff better fit for another thread...