Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Linux Script from Perl

Status
Not open for further replies.

Nutthick

MIS
Jan 14, 2004
126
GB
I think this is probably a no-brainer for someone, but is it possible to call a linux script (*.sh) from Perl, and if so, how?

Thanks
 
Yes. I presume you want to get the output, and do something with it?
Code:
my @stuff = qx[./my.sh];
foreach (@stuff) {
    print $_;
}

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top