Rob Coops wrote:
<snip>


open (IN, "+<dummy.txt");
@file = <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})(.*?)(\d{2}/\d{2}/\d{2})(.*)/$1$ARGV2$3'todays 
date'$4/g; # replace ...
Error message for the above line =
Unmatched ( in regex; marked by <-- HERE in m/(.*?)( <-- HERE \d{2}/ at check.pl

  $file[$i] = $file; # replace this line in the array
  $i = scalar @file; # make $i the same as the size of the file thus ending
the loop
 }
}

Just spotted, when I said "today's date" I meant the computers date at time of running (if I run it tomorrow, today's date will be 23/10/2008)

Confused? I am ;-)

regards
Brian

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to