side by side concatenation

Discussion in 'Perl Misc' started by man.postman@gmail.com, Mar 15, 2005.

  1. Guest

    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....
    , Mar 15, 2005
    #1
    1. Advertising

  2. 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/clpmisc/clpmisc_guidelines.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
    Gunnar Hjalmarsson, Mar 15, 2005
    #2
    1. Advertising

  3. <> 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
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Mar 15, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ralf Hildebrandt

    type conversion and concatenation

    Ralf Hildebrandt, Jul 23, 2003, in forum: VHDL
    Replies:
    3
    Views:
    6,648
  2. walala
    Replies:
    3
    Views:
    4,784
    walala
    Sep 18, 2003
  3. bigdipper_gary
    Replies:
    1
    Views:
    918
    Mike Treseler
    Jan 5, 2004
  4. pandora

    vector concatenation

    pandora, Apr 3, 2004, in forum: VHDL
    Replies:
    8
    Views:
    21,765
    vipinlal
    Mar 26, 2010
  5. Chad

    generic concatenation

    Chad, Aug 25, 2004, in forum: VHDL
    Replies:
    4
    Views:
    643
Loading...

Share This Page