Re: Help with printing 2 files into 1 [OT]

2003-02-18 Thread Paul
--- Bernhard van Staveren <[EMAIL PROTECTED]> wrote: > > band = intmax(strtok(NULL,seps)[0]-64,0); > > I know barely enough C to hang myself with but the above does make > sense, in a real twisted way :D lol -- as I said, that was tame. ;0) > I don't know really, usually the projects I write

Re: Help with printing 2 files into 1 [OT]

2003-02-18 Thread Bernhard van Staveren
> I got my first real programming job in a shop that was all K&R C with > tons of legacy code written by people who had taught themselves the > language Believe me, I hacked like a machete never could, and > statements like > > band = intmax(strtok(NULL,seps)[0]-64,0); > > were considered *qu

Re: Help with printing 2 files into 1 [OT]

2003-02-18 Thread Paul
--- Bernhard van Staveren <[EMAIL PROTECTED]> wrote: > In general my coding style is a bit condensed, I grew up > with Turbo Pascal and was taught to condense everything > (whether or not that was a good call by the teacher, > beats me) so I'm used to it. I got my first real programming job in a

Re: Help with printing 2 files into 1 [OT]

2003-02-18 Thread Bernhard van Staveren
> That's pretty common. A guy in our office prefers: > > my $doc = "\n"; > $doc .= "\tThe various lines of text his program will print\n"; > $doc .= "\tif you call it with no arguments, which he types\n"; > $doc .= "\tin quotes and indiviually appends with the dot op\n"; > $doc .= "\n"; >

Re: Help with printing 2 files into 1 [OT]

2003-02-17 Thread Paul
--- Bernhard van Staveren <[EMAIL PROTECTED]> wrote: > I guess our definitions of unreadable differ in that case; I have my > style of writing things, you have yours - and such is life. That's pretty common. A guy in our office prefers: my $doc = "\n"; $doc .= "\tThe various lines of text hi

Re: Help with printing 2 files into 1

2003-02-17 Thread Bernhard van Staveren
I guess our definitions of unreadable differ in that case; I have my style of writing things, you have yours - and such is life. The extra spaces get on my tits pretty much, and it's perfectly readable without it, IMHO. On Mon, 17 Feb 2003, R. Joseph Newton wrote: > HI Bernard, > > Quick and Dir

Re: Help with printing 2 files into 1 [OT] -- a style discourse ;o]

2003-02-17 Thread Paul
Just for fun, a functional but BAD example use FileHandle; @_ = map { new FileHandle $_ } @ARGV; print while $_ = join "\t", map(scalar<$_>||'',@_), "\n" and s/\n(.)/\t$1/g; Okay, that's ugly and almost completely unmaintainable for LOTS of reasons, but it works. It will even

Re: Help with printing 2 files into 1

2003-02-17 Thread R. Joseph Newton
HI Bernard, Quick and Dirty is one thing. Unreadable is another. Perl allows spaces to be used freely. The programmer who ishes to keep track of what his or her code is doing will use them. use strict; open (FONE, $ARGV[0]); open (FTWO, $ARGV[1]); open (FOUT, ">$ARGV[2]"); my @f1; my @f2;

Re: Help with printing 2 files into 1

2003-02-17 Thread Bernhard van Staveren
> file_1: > 12 > 13 > 14 > 3 > > file_2: > 3 > 45 > 34 > 56 A real quick and dirty way of doing it: -- 8< -- use strict; open(FONE, $ARGV[0]); open(FTWO, $ARGV[1]); open(FOUT, ">$ARGV[2]"); my @f1; my @f2; my $c=0; chomp(@f1=); chomp(@f2=); close(FONE); close(FTWO); for($c=0;$chttp://www.gho

Re: Help with printing 2 files into 1

2003-02-17 Thread Rob Dixon
Aimal Pashtoonmal wrote: > Dear folks, > > I have 2 files each contain a column of data, I want to combine them > into 1 file with the 2 columns next to each other, eg: > > file_1: > 12 > 13 > 14 > 3 > > file_2: > 3 > 45 > 34 > 56 > > desired output: > > 12 3 > 13 45 > 14 34 > 3 56 Ther

Re: Help with printing 2 files into 1

2003-02-17 Thread John W. Krahn
Aimal Pashtoonmal wrote: > > Dear folks, Hello, > I have 2 files each contain a column of data, I want to combine them > into 1 file with the 2 columns next to each other, eg: > > file_1: > 12 > 13 > 14 > 3 > > file_2: > 3 > 45 > 34 > 56 > > desired output: > > 12 3 > 13 45 > 14 34 >

RE: Help with printing 2 files into 1

2003-02-17 Thread Aimal Pashtoonmal
Dear folks, I have 2 files each contain a column of data, I want to combine them into 1 file with the 2 columns next to each other, eg: file_1: 12 13 14 3 file_2: 3 45 34 56 desired output: 12 3 13 45 14 34 3 56 chrs, amal. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad