#!/usr/bin/perl
# Copyright 2007-2009, Kees Cook <kees@outflux.net> License: GPLv3
#
use strict;
use warnings;

if (!defined($ARGV[0])) {
    print <<EOM ;
Need arguments for "ls".  Try:
  ./system.pl /etc/passwd
  ./system.pl '/etc/passwd; id'
  ./system.pl -tr
EOM
    exit(0);
}

print "Bad:\n";
system("ls -la $ARGV[0]");

print "\n";

print "Better:\n";
system("ls","-la",$ARGV[0]);

print "\n";

print "Best:\n";
system("ls","-la","--",$ARGV[0]);

