Set $pass to binary value; rename $date to $mentorDate.
This commit is contained in:
parent
0d564dd4fd
commit
aa5e41555e
1 changed files with 5 additions and 3 deletions
|
@ -47,15 +47,17 @@ while (my $file = readdir $dh) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
my($pass, $name) = ($1, $2);
|
my($pass, $name) = ($1, $2);
|
||||||
|
$pass = ($pass =~ /success/) ? 1 : 0;
|
||||||
|
|
||||||
open(my $fh, "<", File::Spec->catfile($PAYMENT_DIR, $file));
|
open(my $fh, "<", File::Spec->catfile($PAYMENT_DIR, $file));
|
||||||
my $date;
|
my $mentorDate;
|
||||||
while (my $line = <$fh> ) {
|
while (my $line = <$fh> ) {
|
||||||
if ($line =~ /^\s*Date\s*:\s*(.+)\s*$/) {
|
if ($line =~ /^\s*Date\s*:\s*(.+)\s*$/) {
|
||||||
$date = UnixDate(ParseDate($1), "%Y-%m-%d");
|
$mentorDate = UnixDate(ParseDate($1), "%Y-%m-%d");
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
die "Inside $file there is no valid Date:" if (not defined $date);
|
die "Inside $file there is no valid Date:" if (not defined $mentorDate);
|
||||||
|
|
||||||
my(@nameComponents) = split(/\s*-\s*/, $name);
|
my(@nameComponents) = split(/\s*-\s*/, $name);
|
||||||
my(@searchTerms);
|
my(@searchTerms);
|
||||||
|
|
Loading…
Reference in a new issue