Tao Wang wrote: > > thanks a lot. But there is one problem - this is my > fault. The KEY1, KEY2 don't exactly look like this. > There are six KEYS. Three are related to KEYS, but the > rest of them are A_BEG A_END, B_OPTIONS, and I need to > extract information between them. I used one variable > $op=KEY1|KEY2|KEY3|A_BEG|A_END|B_OPTIONS to store all > the alternatives, and tried to use > > my @values = $line =~ /$op.*$op/g; > > But didn't work as i expected. Are there any > problems. please help me with it. thanks again.
my $op = qr/KEY1|KEY2|KEY3|A_BEG|A_END|B_OPTIONS/; my @values = split /$op/, $line; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]