tom arnall wrote: > On Sunday 28 May 2006 12:20 am, John W. Krahn wrote: >>tom arnall wrote: >>>the following code: >>> >>> $_='abcd'; >>> @f = /(x)(y)|(a)(b)/; >>> >>>makes the first two cells of '@f' to be undefined, then puts 'a' and 'b' >>>in the third and fourth cells. how do i get the system to put 'a' and 'b' >>>in the first two cells and to produce no undefined cells? >> >> @f = grep defined, /(x)(y)|(a)(b)/; > > yes. solves my problem. how did you find out about this?
By programming in Perl for many years. :-) John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>