On Wed, 2005-02-02 at 09:23 -0500, Wiggins d'Anconia wrote: > mike wrote: > > Am I right in thinking that if you double quote the seperator in split > > the seperator is added to the array ie: > > > > @array3=split(/"\t/",$value4); would add \t to the end of @array3 while > > As you have written it above I get a syntax error: > > String found where operator expected at ./test.pl line 12, at end of line > (Missing semicolon on previous line?) > Can't find string terminator '"' anywhere before EOF at ./test.pl line 12. > > If you meant, C</"\t"/> then I still don't think you will get what you > want. C<split> just isn't that smart. >
No the problem was that this ( with the quote in the "right" place) was giving me what I didnt want. this is the code @value=param(); shift (@value); shift (@value); pop (@value); print @value; foreach $value (@value){ $value1=substr($value,0,9); if ($value1 eq "work_emai"){ push (@value2,param($value)); push (@value2,"\t"); #print $value2; } else { push (@value2,param($value)); push (@value2,'##'); #print param($value) } } $value4=join('',@value2); print br,"value4",$value4,br; @array3=split(/\t/,$value4); @[EMAIL PROTECTED]; with "\t" the \t was being inserted into a db field, without it everything was hunky dory > > > > @array3=split(/\t/,$value4); would not > > > > What are you really trying to do? > > http://danconia.org > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>