in reply to Re: doubt in storing a data of 2 lines in an array.
in thread doubt in storing a data of 2 lines in an array.

hi john, thank ya for the reply. the program works out very well, and the coding was really smart, i just need to clarify one last doubt of mine, ie., i am not able to print the TITLE's content in the same line, its printing in 2 lines watever i do. plz reply. thank u once again.
  • Comment on Re^2: doubt in storing a data of 2 lines in an array.

Replies are listed 'Best First'.
Re^3: doubt in storing a data of 2 lines in an array.
by johngg (Canon) on Oct 30, 2006 at 15:09 UTC
    You could either do a global substitution something like $field =~ s{\n}{ }g to replace any newline with a space or you could achieve the same thing with split and join, something like $field = join q{ }, split m{\n}, $field;. In each case you are going to have to handle a big gap in your line because of the indentation of the second line of the title. However, this post should give you enough clues about s{this}{the other} to solve that for yourself. Big hint, \s+ means one or more white-space characters.

    Best of luck,

    JohnGG

      hey john, i got it..thanks.