Loading ...
Sorry, an error occurred while loading the content.

Diff b/w using "system" command and using ` `(back quotes) in perl

Expand Messages
  • Madhu Reddy
    Hi, what is the difference between using system call and using ` `(back quotes) in perl ? suppose i have followinh shell script ... #!/bin/ksh echo Before
    Message 1 of 16 , Feb 3, 2004
    • 0 Attachment
      Hi,
      what is the difference between using "system" call
      and using ` `(back quotes) in perl ?

      suppose i have followinh shell script

      ----------t1.ksh-------
      #!/bin/ksh

      echo "Before BTEQ"

      BTEQ <<EOF

      here some commands specific to BTEQ
      EOF

      echo "After Bteq"
      ------------- END of ksh ---------
      following is my perl script

      -----------test.pl---------
      print "executing shell \n";

      system "t1.ksh";

      print "t1.ksh completed";

      ------- end of test.pl ----------

      --------test_1.pl-----------
      print "executing shell \n";

      `t1.ksh`;

      print "t1.ksh completed";

      ----------- END OF test_1.pl------


      1) Out put of test.pl
      executing shell
      BEFORE BTEQ
      After BTEQ

      2) Out put of test_1.pl
      executing shell
      BEFORE BTEQ

      ---------------------
      second one will not printing anything after BTEQ...

      what could be the reasons ?

      Thanks
      -Madhu


      __________________________________
      Do you Yahoo!?
      Yahoo! SiteBuilder - Free web site building tool. Try it!
      http://webhosting.yahoo.com/ps/sb/
    Your message has been successfully submitted and would be delivered to recipients shortly.