Re: parse help On 6/24/07, geek.not@gmail.com  wrote: snip > Let's say my script is script.pl and I pass argument such as - > , it gets me the details of its record.  Any help is > appreciated. I know how to do that  if it is a single line record.. > Also, i don't know how to deal with history line (field for the > history) that has multiple lines. snip $/ is the input seperator.  It is normally set to "\\n" (which is why the <> operator reads line by line), bit it looks like, given your data, you should set it to "\\n\\n".  That will get you a record at a time.  The other issue is slightly more tricky.  If you didn't have that multiline field you could have easily use two spilts (one to break the record in to fields and the other to fields into key and value pairs).  I would suggest splitting each record on "\\n", looping over the results checking to see if the first character is a space, and appending that line to the last field if it is or creating a new key/value pair if it isn't. --  To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional commands, e-mail: beginners-help@perl.org http://learn.perl.org/