in reply to Re: extracting data and saving into seperate files
in thread extracting data and saving into seperate files

He's using <> so the original text file is implicitly opened if given on the cmd line. I guess you already knew, but you may have just overlooked it.

To be sure, just take his code and modify it like thus:

#!/usr/bin/perl -l my @file = <>; print 0+@file;

Indeed

$ ./bar.pl data.txt 46 $ wc data.txt 46 36 346 data.txt