Brian wrote:
John W. Krahn wrote:
Brian wrote:
Partial success.
The value is normally located starting at the 35th char
into the line.
I split the line so it was at the beginning of a new line and
worked.
Unfortunately the dates never changed.
I will sleep on this and attack it again in
John W. Krahn wrote:
Brian wrote:
Partial success.
The value is normally located starting at the 35th char
into the line.
I split the line so it was at the beginning of a new line and with> worked.
Unfortunately the dates never changed.
I will sleep on this and attack it again in the mornin
Brian wrote:
Partial success.
The value is normally located starting at the 35th char
into the line.
I split the line so it was at the beginning of a new line and with> worked.
Unfortunately the dates never changed.
I will sleep on this and attack it again in the morning.
Based on the exam
Brian wrote:
Brian wrote:
John W. Krahn wrote:
Brian wrote:
#!/usr/bin/perl
use warnings;
use strict;
@ARGV == 3 or die "usage: $0 \n";
my ( $search, $replace, $date ) = @ARGV;
my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ];
my $today = sprintf '%02d/%02d/%04d', $day, $mon + 1, $
Brian wrote:
Brian wrote:
John W. Krahn wrote:
Brian wrote:
Hi
Hello,
#!/usr/bin/perl
use warnings;
use strict;
@ARGV == 3 or die "usage: $0 \n";
my ( $search, $replace, $date ) = @ARGV;
my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ];
my $today = sprintf '%02d/%02d/%04d', $day
Brian wrote:
John W. Krahn wrote:
Brian wrote:
Hi
Hello,
#!/usr/bin/perl
use warnings;
use strict;
@ARGV == 3 or die "usage: $0 \n";
my ( $search, $replace, $date ) = @ARGV;
my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ];
my $today = sprintf '%02d/%02d/%04d', $day, $mon + 1, $y
John W. Krahn wrote:
Brian wrote:
Hi
Hello,
#!/usr/bin/perl
use warnings;
use strict;
@ARGV == 3 or die "usage: $0 \n";
my ( $search, $replace, $date ) = @ARGV;
my ( $day, $mon, $year ) = ( localtime )[ 3, 4, 5 ];
my $today = sprintf '%02d/%02d/%04d', $day, $mon + 1, $year + 1900;
(
Brian wrote:
Hi
Hello,
ARGV0 will = AB7Z001
ARGV1 will = AB7Z002
ARGV2 will = 01/01/1900
I would like to read a file, locate AB7Z001 (but not AB7Z0011, so a space at
position 8 in string )
Upon location of value in argv0 replace it with argv1.
Then, at the first instance of a date replace
Rob Coops wrote:
open (IN, "+;
close IN;
for ( my $i = 0; $i < scalar @file; $i++ ) { # loop trought the file line by
line
if ( $file =~ m/$ARGV0/g ) { # look for argument $ARGV0
$file =~ s/$ARGV0(\b.*)/$ARGV1$1/g; # replace argument $ARGV0 with $ARGV1
$file =~
s/(.*?)(\d{2}/\d{2}/\d{2}
From: Rob Coops <[EMAIL PROTECTED]>
To: beginners@perl.org
Sent: Wednesday, October 22, 2008 3:24:12 PM
Subject: Re: Conditional replace
On Wed, Oct 22, 2008 at 3:38 PM, Brian <[EMAIL PROTECTED]> wrote:
> Hi
>
> ARGV0 will = AB7Z001
&
On Wed, Oct 22, 2008 at 3:38 PM, Brian <[EMAIL PROTECTED]> wrote:
> Hi
>
> ARGV0 will = AB7Z001
> ARGV1 will = AB7Z002
> ARGV2 will = 01/01/1900
>
> I would like to read a file, locate AB7Z001 (but not AB7Z0011, so a space
> at position 8 in string )
> Upon location of value in argv0 replace it w
Hi
ARGV0 will = AB7Z001
ARGV1 will = AB7Z002
ARGV2 will = 01/01/1900
I would like to read a file, locate AB7Z001 (but not AB7Z0011, so a space at
position 8 in string )
Upon location of value in argv0 replace it with argv1.
Then, at the first instance of a date replace it with argv2.
Then, at t
12 matches
Mail list logo