I am using the following line to make a simple system call which works:
system (\"mkdir -p Purged\") or die \"Failed to mkdir.\" ;
Executin
system returns 0 on success, so you want and rather than or.
system
0
and
or
See also: use autodie qw( system );
use autodie qw( system );