in reply to using split on a file
my ($allsource) ; while <FILE> { $allsource .= $_ ; } # Now $allsource contains all of the lines of the file my (@segments) = split /%{5}/, $allsource ; # Each element in @segments is one of the segments # Could undefine $allsource to free a little memory undef ($allsource) ;
|
|---|