Hi
I'l looking for a way to use a scalar in a regex. The snibblet below
shows in about what it is supposed to do.
if someone has a better idea how to compare the date value with the
$date_today value I extract from the text file, I'd be really happy
about any hints..
The snibblet doesn't work, because it looks for the string "$date" and
not for the value of $date...
Thanks for your help.
Regards,
Sven
sub regex {
#textfile has the following format:
# DD-MM-YY:name:address:telephone
#$date has the value of the current date DD-MM-YY
open APODATA2, "<$apodataFile"
|| die "Can't open
$apodataFile for regex :$!\n";
while ($date_today = <APODATA2> ) {
if ($date_today =~ /$date/) {
print "date_today: $date_today\n";
}
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]