codescracker


perl

Perl Process Management



« Previous Tutorial CodesCracker Home »


You are free to use various ways to create new process in perl. Here are the following points to keep in mind

Perl Process Management Example

Let's take a look at the following example:

#!/usr/bin/perl

@files = `ls -l`;

foreach $file (@files){
   print $file;
}

1;

When the above perl program is executed, it lists all the files and directories present inside the current directory:

drwxr-xr-x 3 root root 4096 Sep 14 06:46 9-14
drwxr-xr-x 4 root root 4096 Sep 13 07:54 android
-rw-r--r-- 1 root root  574 Sep 17 15:16 index.htm
drwxr-xr-x 3  544  401 4096 Jul  6 16:49 MIME-Lite-3.01
-rw-r--r-- 1 root root   71 Sep 17 15:16 test.pl
drwx------ 2 root root 4096 Sep 17 15:11 vAtrJdy

« Previous Tutorial CodesCracker Home »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test