System calls

If you need to make a system call, there's a couple easy ways to do it. One is to use the system() function like so,

system("whoami");

The above will print to STDOUT the username the account is running under, but it does print.

If you'd like to store this value in a variable, you can use the back tick character as in the following,

my $username = `whoami`;

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.