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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
18 matches
Mail list logo