I nearly always prefer using the perl-functions because of the following reasons:
- Better portability: sometimes external programs are not available under certain operating systems or are called slightly different
- Easier to eval success, because you don't need to parse the output of a command, just ask for the returncode and perhaps an errormessage
- Less dependence to environmentvariables like PATH, or at the other hand, to fixed pathes
- In my eyes, it is a more homogenous program than lots of system calls
- Security issues
Reasons for system calls might be:
- Performance: but that often doesn't matter
- Better handling (e.g. sendmail)
- There is no good perl interface to this program available
But you have to decide what to use, for it's your code :-)
Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"