in reply to Print contents of a range of text files to browser (was: text files)
UPDATE:use strict; use CGI qw(:header); use CGI::Carp qw(fatalsToBrowser); use File::Find; use File::Basename; my $start = 3; my $end = 40; my $dir = 'files'; @ARGV = (); die "start must be less than end" if $start >= $end; die "no dir $dir here" unless -d $dir; find sub { my $numb = (fileparse($_,'.txt'))[0]; return unless $numb =~ /^\d+$/; push @ARGV, $File::Find::name if $numb >= $start and $numb <= $end; }, $dir; die "no .txt files found in $dir" unless @ARGV; print header; print while <>;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Print contents of a range of text files to browser
by cjf (Parson) on Jun 16, 2002 at 18:29 UTC | |
|
Re: (jeffa) Re: Print contents of a range of text files to browser (was: text files)
by Anonymous Monk on Jun 17, 2002 at 00:02 UTC |