in reply to Match multiple lines

Try:
my(@raw_data)=<GPXDATA>; # read file into array, one line per element splice @raw_data,0,2; # delete the first two lines

--------
~%{${@_[0]}}->{0}&&+++ NO CARRIER

Replies are listed 'Best First'.
Re^2: Match multiple lines
by Anonymous Monk on Sep 21, 2009 at 11:18 UTC
    Thank you! This is what I was able to come up with:
    use File::Find; my $dir = Cwd::getcwd(); my $string = "//Kartex TrackFil skapad av Kartex 5.4\n&KTF 2.0,sweref +99 lat long,1\n"; open (MYFILE, '>>merged.ktf'); print MYFILE $string; close (MYFILE); find(\&wanted,$dir); sub wanted { if ($_ != /\.ktf$/) { print "$File::Find::name\n"; open (KTFDATA, "$File::Find::name") || die("Could not open fil +e! $File::Find::name"); my (@raw_data) = <KTFDATA>; splice @raw_data,0,2; close (KTFDATA); open (MYFILE, '>>merged.ktf'); print MYFILE @raw_data; close (MYFILE); } }