Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: doubt in storing a data of 2 lines in an array.

by Anonymous Monk
on Oct 30, 2006 at 14:53 UTC ( #581306=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://581306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2023-09-26 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?