How to use shell command on Perl scritps?

On our OS I don't have Perl df command. How can I use shell commands from Perl scripts?

Sorry I don't understand - You don't have perl on your system, or you don't have a df module in your perl installation on your system?

How do you import this command? It will help us identify what you are trying to do and come up with a suggestion.

Could you also provide us with your operating system and perl version?

perl -v

Thanks,

Andrew

$output=`df`;

...though if your perl code is nothing but line after line of things in backticks, you're not actually writing perl, you're writing shell.

We have a Perl, we don't have the newest version. That is why I have to make something to use shell from Perl. We don't have

      Filesys::Df
 

That is why I am looking how to use shell in perl

I don't have that on my system either. Can't you ask your SysAdmin to install it? On my Ubuntu system (and you still haven't told us the OS you are using) it is in the package libfilesys-df-perl

Andrew

Not in our company. The decision will make top management. When I asked I got an answer "Do not make a revolution here"

So, you can run shell commands as listed above. Or an alternative way:

system("df");