Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > side by side concatenation

Reply
Thread Tools

side by side concatenation

 
 
man.postman@gmail.com
Guest
Posts: n/a
 
      03-15-2005
I have an output

RowId Col1 Col2 Col3
...
...
...
...


--------------------------------------

RowId Col4 Col5 Col6

....
...
...

-----------------------------------------

I am trying to write a perl script to make it..

Row Id Col1 Col2 Col3 Col4 Col5 Col6

any advice???

thanks to everyone who responds....

 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      03-15-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I have an output
>
> RowId Col1 Col2 Col3
> ..
> ..
> ..
> ..
>
>
> --------------------------------------
>
> RowId Col4 Col5 Col6
>
> ...
> ..
> ..
>
> -----------------------------------------
>
> I am trying to write a perl script to make it..
>
> Row Id Col1 Col2 Col3 Col4 Col5 Col6
>
> any advice???


Study the posting guidelines for this group:
http://mail.augustmail.com/~tadmc/cl...uidelines.html

and let us know *what* you tried and how it failed to do what you want.

Also, you'd better provide more complete sample data, letting us know
for instance how the columns are separated and whether there is data in
each field.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      03-15-2005
(E-Mail Removed) <(E-Mail Removed)> wrote:
> I have an output
>
> RowId Col1 Col2 Col3
> ..
> ..
> ..
> ..
>
>
> --------------------------------------
>
> RowId Col4 Col5 Col6
>
> ...
> ..
> ..
>
> -----------------------------------------
>
> I am trying to write a perl script to make it..
>
> Row Id Col1 Col2 Col3 Col4 Col5 Col6
>
> any advice???




Here is a program that does that:

================================================== =
#!/usr/bin/perl
use warnings;
use strict;

my $output = 'RowId Col1 Col2 Col3
...
...
...
...


--------------------------------------

RowId Col4 Col5 Col6

....
...
...

-----------------------------------------
';

$output =~ s/RowId/Row Id/;
$output =~ s/RowId//;
$output =~ tr/a-zA-Z0-9/ /cs;

print "$output\n";
================================================== =


> thanks to everyone who responds....



You're welcome.

Have you seen the Posting Guidelines that are posted here frequently?


--
Tad McClellan SGML consulting
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vector concatenation pandora VHDL 8 03-26-2010 02:36 PM
generic concatenation Chad VHDL 4 08-26-2004 03:48 PM
Different concatenation result VJDL93' generates from VHDL'87 bigdipper_gary VHDL 1 01-05-2004 05:20 PM
what's the difference between VHDL 93 CONCATENATION and VHDL 87 CONCATENATION? walala VHDL 3 09-18-2003 04:17 AM
type conversion and concatenation Ralf Hildebrandt VHDL 3 07-28-2003 06:41 AM



Advertisments