in reply to Count the number of lines in a file

You don't really need perl for this ...
$ wc -l existing_file > another_file
... but you can if you want ...
#!/usr/bin/perl -w my $file = shift; my @cmd = ( "wc", "-l", $file ); system( @cmd );

Plankton: 1% Evil, 99% Hot Gas.