Put your list of files in @ARGV and then use <>.
#!/usr/bin/perl use strict; use warnings; @ARGV = ('file2.txt', 'file4.txt', 'file15.txt'); open SEL, '>', 'selected.txt' or die $!; while (<>) { print SEL; }
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: cat -ing Multiple files with Perl
by davorg
in thread cat -ing Multiple files with Perl
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |