$ wc -l existing_file > another_file #### #!/usr/bin/perl -w my $file = shift; my @cmd = ( "wc", "-l", $file ); system( @cmd );