What you do not say is what you want to do with the new-lines at the end of each data item. A for loop is probably called for to remove them, but replace them with what?use warnings; use strict; local $/ = 'DELIMITING_TEXT'; my @array = <DATA>; chomp @array; local $" = '|'; print "@array\n"; __DATA__ some junk DELIMITING_TEXT test1 test2 test3 test4 DELIMITING_TEXT test1 test2 test1 test2 test1 test2 DELIMITING_TEXT test1 test2 DELIMITING_TEXT some junk
In reply to Re: split based upon string
by cdarke
in thread split based upon string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |