in reply to split post match
Perhaps if you post some code it would be easier to see what you are doing wrong.
I am guessing the correct version might look something like this:
Is it anything like this?#!/usr/bin/perl use strict; use warnings; open( my $file, "/tmp/bighurkinfile" ) or die "failed to open bighurki +nfile: $!"; chomp( my $pattern = <$file> ); # assumes pattern on first line by its +elf my @records; { local $/ = undef; @records = split /$pattern/, <$file>; # probably should do sanity +check on the pattern first... }
|
|---|