on Wed, 22 May 2002 10:26:34 GMT, [EMAIL PROTECTED] (Sven
Bentlage) wrote: 

> my $date = `/bin/date +%d.%m.%y`;
> $date =~ tr/./-/;
> chomp $date;

There is no need to fork here. You can accomplish the same from 
within Perl, by replacing the above lines with

    my ($d, $m, $y) = (localtime)[3,4,5];
    my $date = sprintf("%02d-%02d-%02d", $d, $m+1, $y-100);

See
        perldoc -f localtime
        perldoc -f sprintf

> my $apodataFile = "/Users/johnd0e/Desktop/apodata.txt";
> open APODATA2,  "<$apodataFile"
>                          || die "Can't open $apodataFile for regex
>                          || :$!\n"; 

You have a precedence problem here, since '||' has higher precedence 
than ','. You should either use 

        open(FH, "<foo") || die;
        open FH, "<foo" or die;

(Why are you putting a second '||' within quotes?)

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to