Re: Need help with script

2004-10-04 Thread Paul Johnson
On Thu, Sep 30, 2004 at 04:44:36PM -0700, John W. Krahn wrote: Paul Johnson wrote: On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: perl -l -00pe's/\n/\t/;s/\//g;' FILENAME $ perl -MO=Deparse -l00pe's/\n/\t/;s/\//g' BEGIN { $/ = \n; $\ = \000; } In your example you have removed

Re: Need help with script

2004-09-30 Thread Jose Alves de Castro
On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: I would like the output in the following format object1...tabDescription1 object2...tabDescription2 object3...tabDescription3 perl -lne 'BEGIN{$/=\n\n;}s/\n/\t/;print' FILENAME perl -l -00pe's/\n/\t/' FILENAME

Re: Need help with script

2004-09-30 Thread Errin Larsen
Hi Perlers, On 30 Sep 2004 10:11:29 +0100, Jose Alves de Castro [EMAIL PROTECTED] wrote: On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: I would like the output in the following format object1...tabDescription1 object2...tabDescription2 object3...tabDescription3

Re: Need help with script

2004-09-30 Thread Paul Johnson
On Thu, Sep 30, 2004 at 08:00:41AM -0500, Errin Larsen wrote: Hi Perlers, On 30 Sep 2004 10:11:29 +0100, Jose Alves de Castro [EMAIL PROTECTED] wrote: On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: perl -l -00pe's/\n/\t/;s/\//g;' FILENAME It is my opinion that code should be

RE: Need help with script

2004-09-30 Thread Charles K. Clarkson
From: Errin Larsen mailto:[EMAIL PROTECTED] wrote: [snip] : There! Am I right? This is fun ... we should do this : more often! This taught me a lot. That's one advantage of answering questions on a list like this. You learn while researching the answer. Most of my experience with perl

Re: Need help with script

2004-09-30 Thread Errin Larsen
Hi Paul, Thx for the response On Thu, 30 Sep 2004 15:30:06 +0200, Paul Johnson [EMAIL PROTECTED] wrote: SNIP Pretty close: $ perl -MO=Deparse -l00pe's/\n/\t/;s/\//g' BEGIN { $/ = \n; $\ = \000; } LINE: while (defined($_ = ARGV)) { chomp $_; s/\n/\t/; s///g; } continue

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Paul Johnson wrote: On Thu, Sep 30, 2004 at 08:00:41AM -0500, Errin Larsen wrote: Hi Perlers, On 30 Sep 2004 10:11:29 +0100, Jose Alves de Castro [EMAIL PROTECTED] wrote: On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: perl -l -00pe's/n/t/;s///g;' FILENAME It is my

Re: Need help with script

2004-09-30 Thread Paul Johnson
On Thu, Sep 30, 2004 at 11:26:27AM -0500, Errin Larsen wrote: When I run your command line up there, I get the following: # perl -MO=Deparse -l00pe's/\n/\t/;s/\//g' LINE: while (defined($_ = ARGV)) { chomp $_; s/\n/\t/; s///g; } continue { print $_; } -e syntax OK

Re: Need help with script

2004-09-30 Thread Errin Larsen
Thanks for your help guys... But the code is performing the logic only for the first set of lines... After the running the above script, the output looks like Object1...tab...Description1 Object2 Description2 Object3 Description3 Can you post EXACTLY what's in the input file for

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I am using Cygwin on Win2K and the version of perl on it is v5.8.0 I am using the same input file, but when I run the command you ran, the output looks like Object1 Description1 Object2 Description2 Object3 Description3 Thanks Errin Larsen wrote: Thanks for your help guys... But

Re: Need help with script

2004-09-30 Thread Errin Larsen
On 30 Sep 2004 19:52:31 -, PerlDiscuss - Perl Newsgroups and mailing lists [EMAIL PROTECTED] wrote: I am using Cygwin on Win2K and the version of perl on it is v5.8.0 I am using the same input file, but when I run the command you ran, the output looks like Object1 Description1

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi again, Ok, I've got ActiveState on WinXP, 5.8.4 ... I tried and found that I had the same problems as you. After much playing around, I found it's a quoting problem on the command line (at least, in my case it was). I just don't have a good grasp of quoting rules and precedence in DOS

Re: Need help with script

2004-09-30 Thread John W. Krahn
Errin Larsen wrote: Hi Perlers, On 30 Sep 2004 10:11:29 +0100, Jose Alves de Castro [EMAIL PROTECTED] wrote: On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: I would like the output in the following format object1...tabDescription1 object2...tabDescription2 object3...tabDescription3

Re: Need help with script

2004-09-30 Thread John W. Krahn
Paul Johnson wrote: On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: perl -l -00pe's/\n/\t/;s/\//g;' FILENAME $ perl -MO=Deparse -l00pe's/\n/\t/;s/\//g' BEGIN { $/ = \n; $\ = \000; } In your example you have removed the -0 switch so it is doing something completely different. John -- use

Re: Need help with script

2004-09-29 Thread Wiggins d Anconia
Please use a more descriptive subject line I have a file with the following format Object1 Description1 Object2 Description Object3 Description I would like the output in the following format object1...tabDescription1 object2...tabDescription2

Re: Need help with script

2004-09-29 Thread Ramprasad A Padmanabhan
On Wed, 2004-09-29 at 18:55, PerlDiscuss - Perl Newsgroups and mailing lists wrote: I have a file with the following format Object1 Description1 Object2 Description Object3 Description I would like the output in the following format object1...tabDescription1

Re: Need help with script

2004-09-29 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: On Wed, 2004-09-29 at 18:55, PerlDiscuss - Perl Newsgroups and mailing lists wrote: I have a file with the following format Object1 Description1 Object2 Description Object3 Description I would like the output in the following format object1...tabDescription1

Re: Need help with script

2004-09-29 Thread JupiterHost.Net
I would like the output in the following format object1...tabDescription1 object2...tabDescription2 object3...tabDescription3 perl -lne 'BEGIN{$/=\n\n;}s/\n/\t/;print' FILENAME perl -l -00pe's/\n/\t/' FILENAME That's pretty slick you guys, he's sure to get an A+ ;) If your teacher