Hi Felix thanks for the tips. On Wednesday, May 22, 2002, at 01:20 PM, Felix Geerinckx wrote:
> You have a precedence problem here, since '||' has higher precedence > than ','. You should either use > > open(FH, "<foo") || die; > open FH, "<foo" or die; > didn't know that yet. fixed it. > (Why are you putting a second '||' within quotes?) > sorry, but I'm not really understanding what you mean by second "||" within the quotes. here is the code again: my ($d, $m, $y) = (localtime)[3,4,5]; my $date = sprintf("%02d-%02d-%02d", $d, $m+1, $y-100); $date =~ tr/./-/; chomp $date; my $apodataFile = "/Users/johnd0e/Desktop/apodata.txt"; open (APODATA2, "<$apodataFile") || die "Can't open $apodataFile for regex :$!\n"; my ( $date_today, $aponame, $apoaddress, $apotel ); while ( <APODATA2> ) { ( $date_today, $aponame, $apoaddress, $apotel ) = split(/:/,$_); if (/$date/) { print "date_today: $date_today __ $date\n" ; } } Regards, Sven -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]