fork download
  1. #!/usr/bin/perl
  2. use utf8; # or use Sjis;
  3. use strict;
  4. use warnings;
  5.  
  6. my $ps = `ps -ef`;
  7. print $ps,"\n\n\n";
  8.  
  9. $0 = 'kamomekamome';
  10.  
  11. $ps = `ps -ef`;
  12. print $ps;
Success #stdin #stdout #stderr 0s 17768KB
stdin
Standard input is empty
stdout


stderr
Can't exec "ps": No such file or directory at prog.pl line 6.
Use of uninitialized value $ps in print at prog.pl line 7.
Can't exec "ps": No such file or directory at prog.pl line 11.
Use of uninitialized value $ps in print at prog.pl line 12.