I have a file that i have to read...the data is delimited by string 'chr(9)' sample data
DataAchr(9)DataBchr(9)DataCi want to use split function to put this into an array...
if i do the following i get an error...here's my code
open (OBFILE, 'outbound.txt'); open (OBout, '>outbound_output.txt'); while (<OBFILE>) { chomp; $re = 'chr(9)'; @array= split(/$re/,$_); #print OBout "$date\t$time\t$ani\t$entid\n"; print "@array\n"; } close(OBFILE); close(OBout);
In reply to split() help by realz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |