Re: Removing out new lines

2011-12-07 Thread C.DeRykus
On Dec 1, 6:43 am, whereismel...@gmail.com (Melvin) wrote: > Hi I have a file in the following format > > 111 > 222 > 333 > > Now I need to print the following output from the given input file as > 111 222 333 > The versatile File::Slurp can be a handy shortcut: # File::Slurp will croak if there'

Re: Removing out new lines

2011-12-06 Thread Melvin Simon
Thanks a lot Rob. "chomp" command did the job as you suggested. Also, to add I manually did it in gvim using the "j" in command mode. Thanks, Melvin On Sun, Dec 4, 2011 at 3:14 AM, Rob Dixon wrote: > On 01/12/2011 14:43, Melvin wrote: > >> Hi I have a file in the following format >> >> 111 >>

Re: Removing out new lines

2011-12-03 Thread John W. Krahn
Melvin wrote: Hi I have a file in the following format 111 222 333 Now I need to print the following output from the given input file as 111 222 333 $ echo "111 222 333" | perl -l040pe1 111 222 333 Is there a way I can do this in perl? I tried 2 ways (both ere essentially the same) 1) Par

Re: Removing out new lines

2011-12-03 Thread Rob Dixon
On 01/12/2011 14:43, Melvin wrote: Hi I have a file in the following format 111 222 333 Now I need to print the following output from the given input file as 111 222 333 Is there a way I can do this in perl? I tried 2 ways (both ere essentially the same) 1) Parsing the file and pushing the in