hello all - I am trying to do the following to this data: input: X|Y||||Z||A
desired output: X|Y| | | |Z| |A simply replacing || with | | whereever it may occur in the string. This bit of code doesn't seem to do all of the job. What is wrong with this code? while (<>) { while($_ =~ /([|])([|])/g) { $_ =~ s/([|])([|])/$1 $2/g; print "$_"; } } The problems seems that my bit of code doesn't completely catch "all" of the || occurences within a given line. Please help!!! __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]