Formatting output after search and replace

2008-04-30 Thread melody
I have 2 files one has the input and the other has data that will replace specific string in file 1 eg File 1 - Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced File 2 - replaced1 replaced2 replaced3 Output --

Formatting output after search and replace

2008-04-29 Thread melody
I have 2 files one has the input and the other has data that will replace specific string in file 1 eg File 1 - Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced Text| to be replaced File 2 - replaced1 replaced2 replaced3 Output --

Re: Formatting output after search and replace

2008-04-29 Thread Chas. Owens
On Tue, Apr 29, 2008 at 6:06 PM, melody [EMAIL PROTECTED] wrote: snip #!/usr/bin/perl use warnings; use strict; snip Good, keep this up snip my @array; my @replacearray; snip Try to declare your variables where you initialize them. snip open FHR,'',repl.txt; open

Formatting output

2004-02-10 Thread Roger Grosswiler
hi again, thanks to you, i got it with my date. so 1st point is out. i still have a short problem, as i should get my date back in the format ddmmyy and i get it in d m y (with %2d, but how to handle in vars) #!/usr/bin/perl $t1=time(); $t2=$t1 - 604800; $diff=$t1 - $t2; print Zeit 1;

Re: Formatting output

2004-02-10 Thread Jan Eden
Roger Grosswiler wrote: hi again, thanks to you, i got it with my date. so 1st point is out. i still have a short problem, as i should get my date back in the format ddmmyy and i get it in d m y (with %2d, but how to handle in vars) How about $lt2mday = sprintf(%02d, $lt2mday); perldoc -f

Formatting output

2002-12-26 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
I am trying to iterate through two hashes and print each key/value. In one column the key/value from one hash and another column the key/values of the other hash. So the output would look something like this Some header |header for column 2 Key value key value

Formatting output

2002-12-26 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
Accidentally sent before I was done writing. I am trying to iterate through two hashes and print each key/value. In one column the key/value from one hash and another column the key/values of the other hash. So the output would look something like this Some header |header for

RE: Formatting output

2002-12-26 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
! SrA Jensen, USAF -Original Message- From: Jensen Kenneth B SrA AFPC/DPDMPQ [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 26, 2002 8:46 AM To: '[EMAIL PROTECTED]' Subject: Formatting output Accidentally sent before I was done writing. I am trying to iterate through two hashes

RE: Formatting output

2002-12-26 Thread Bob Showalter
-Original Message- From: Jensen Kenneth B SrA AFPC/DPDMPQ [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 26, 2002 9:46 AM To: '[EMAIL PROTECTED]' Subject: Formatting output Accidentally sent before I was done writing. I am trying to iterate through two hashes and print

Re: Formatting output

2002-12-26 Thread R. Joseph Newton
Hi, I'm going to take this from here, rather than go on to the full code, because I think I see the core of the problem here. The foreach just isn't going to do it for what you want, although you maight call it on one of the hashes. You don't really indicate whether there is supposed to be

RE: formatting output

2002-12-12 Thread Mystik Gotan
And sprintf(), format(). -- Bob Erinkveld (Webmaster Insane Hosts) www.insane-hosts.net MSN: [EMAIL PROTECTED] From: Paul Kraus [EMAIL PROTECTED] To: 'Mariusz' [EMAIL PROTECTED], 'perl' [EMAIL PROTECTED] Subject: RE: formatting output Date: Thu, 12 Dec 2002 07:59:54 -0500

formatting output

2002-12-11 Thread Mariusz
I'm outputting lots of text into an email message. I would like to have some basic control over the way how it is presented, but the only command I know is \n - new line. What about tab, spaces, etc..? Mariusz

Re: formatting output

2002-12-11 Thread bansidhar
tab is \t and space is normal space *** REPLY SEPARATOR *** On 12/11/02 at 11:45 PM Mariusz wrote: I'm outputting lots of text into an email message. I would like to have some basic control over the way how it is presented, but the only command I know is \n - new line. What

Re: formatting output

2002-12-11 Thread Narayan Kumar
Hope this is what you need \r - return; \t - tab \f - form feed \b - backspace \a - bell \e - escape \007 - Any octal ASCII value ( here, 007 = bell ) \x7f - Any hex ASCII value ( here, 7f = delete ) .. ... From the Llama Book pg: 24 Narayan On Wed, 11 Dec 2002, Mariusz wrote:

Formatting output

2002-06-13 Thread Frank Newland
All, I want to format the output of my database query. Current code while (@row =$sth-fetchrow() ) { print join(',',@row); } Results 1.38, .0396,.0076 Desired Results 1.38, 0.0396, 0.0076 Here's what I've tried.. but none of these formats appear $row[0] = sprintf(%04d,$row[2]); ##

Re: Formatting output

2002-06-13 Thread Ovid
I want to format the output of my database query. Current code while (@row =$sth-fetchrow() ) { print join(',',@row); } Results 1.38, .0396,.0076 Desired Results 1.38, 0.0396, 0.0076 Frank, It's tough for me to be sure exactly what you are wanting for formatting, so I would

Re: Formatting output

2002-06-13 Thread Jeff 'japhy' Pinyan
On Jun 13, Frank Newland said: Results 1.38, .0396,.0076 Desired Results 1.38, 0.0396, 0.0076 $row[0] = sprintf(%04d,$row[2]); ## results in == 0. $row[1] = sprintf(%0d.%04d,$row[4]); ## results in ==0. %d is for INTEGERS. You have floating points, so use %f. -- Jeff japhy

Re: Formatting output

2002-06-13 Thread John W. Krahn
Frank Newland wrote: I want to format the output of my database query. Current code while (@row =$sth-fetchrow() ) { print join(',',@row); } Results 1.38, .0396,.0076 Desired Results 1.38, 0.0396, 0.0076 $ perl -le'print join , , map { sprintf %.4f, $_ } ( 1.38, .0396, .0076

Re: Formatting Output

2002-05-29 Thread Janek Schleicher
Melissa Cama wrote at Wed, 29 May 2002 03:13:46 +0200: ... I need to print out each value in the array (for each key) as a new line in an excel/CSV file. Also with each new line, a time stamp needs to be printed. ... foreach $str_feature (%hash_FeatureUsers){

Formatting Output

2002-05-28 Thread Melissa.Cama
Hi, I currently have a hash which has one value as the key, and then an array of values assigned to this key. However the arrays are different lengths. I need to print out each value in the array (for each key) as a new line in an excel/CSV file. Also with each new line, a time stamp needs

Re: Formatting Output

2002-05-28 Thread John W. Krahn
Melissa Cama wrote: Hi, Hello, I currently have a hash which has one value as the key, and then an array of values assigned to this key. However the arrays are different lengths. I need to print out each value in the array (for each key) as a new line in an excel/CSV file. Also with