Mega Code Archive

 
Categories / Perl / Language Basics
 

Build the ARGV array with qw function

#!/usr/bin/perl -w use strict; @ARGV = qw(file1.dat file2.dat file3.dat); while (<>) {     print "text read: $_"; }