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
--
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
--
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
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;
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
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
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
!
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
-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
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
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
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
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
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:
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]); ##
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
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
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
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){
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
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
21 matches
Mail list logo