On 4/21/05, FreeFall wrote: > Sure I did with Paul's example data : > $date = 'one | two |three |'; > And I tried to change the regx /\s*\|\s*/ to /s*\|?\s*/ and it worked. What > do you think?
I think that's very strange. Here is my version: > perl -MData::Dumper -we'use strict; my $date = q{one | two |three > |};my @record = split /\s*\|\s*/,$date;print Dumper ([EMAIL PROTECTED]);' $VAR1 = [ 'one', 'two', 'three' ]; Here is yours: > perl -MData::Dumper -we'use strict; my $date = q{one | two |three > |};my @record = split /\s*\|?\s*/,$date;print Dumper ([EMAIL PROTECTED]);' $VAR1 = [ 'o', 'n', 'e', 't', 'w', 'o', 't', 'h', 'r', 'e', 'e' ]; As you can see, your version doesn't work correctly. -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>