In Perl, you can either use the built-in Perl, or use system (), which calls the shell command to achieve a specific goal. The problem is that for me, as a Perl beginner, it is sometimes difficult to find the Perl equivalent for the Linux command.
Take this for example:
cat file1 file2 | sort -u > file3
I really want to use only Perl functions to make my Perlish more, but I cannot easily find out how to avoid using system () in this case.
So, I wonder if there is an advantage to using the Perl library functions than using the system () call? Which one is better?
linux perl
duleshi
source share