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) ;
In reply to Re: using split on a file
by jamescohen
in thread using split on a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |