top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

What is an alternative of system() in PERL?

+2 votes
What is an alternative of system() in PERL?
posted Oct 26, 2014 by Prakash Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can try exec() and `` (backticks). However they are not identical as system (system fork a new process where as exec does in the same process) but very close of system. Let me know if looking for something different.

answer Oct 27, 2014 by Salil Agrawal
Similar Questions
+1 vote

I would retrieve my hash table when i pass it in argument at a function. In my case, function1 return my hash table, then i pass my hash table in argument to my function2 and in my function2 i would retrieve my hash table for browse it.

sub function1{
    my code;
    return %hash;

sub function2{
    my %hash=$_[0];
    my code browse my hash;

my %hash = function1();

I have the following error : Odd number of elements in hash assignment at

+1 vote
$ perl -le 'system "df -h"'
$ perl -le 'system "df","-h"'

Both two styles work fine. What's the difference between them and which is better usage?

+1 vote

I'm looking for introductory to advanced examples of RESTful programming in Perl preferably with some good explanations and best practices.

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.