Thanks!

I'm not sure I understand, though.

I'm trying to write to file 'a01file' which is represented by file handle
$a01.
The info I'm trying to write is "XYZ\n".

I think your solution writes to standard out, not file a01file.
I'm probably still missing something.

Thanks again!

                -----Original Message-----
                From:   Johnathan Kupferer [mailto:[EMAIL PROTECTED]]
                Sent:   Monday, April 30, 2001 4:34 PM
                To:     Cron, Daniel
                Cc:     '[EMAIL PROTECTED]'
                Subject:        Re: FileCache - use strict

                The error is a bit misleading.  The problem is you need an
operator 
                between $ao1 and "XYZ\n".  Try:

                print $a01, "XYZ\n";

                or

                print $a01 . "XYZ\n";

                This should clear things up.  I don't know whay perl is
trying to do with it if you don't "use strict"...

                - Johnathan

                > 
                > How can I fix this so it will work with "use strict;"?
                > (The program is really a few hundred lines long and
growing. I find having
                > "use strict;" on helps me catch a lot of bugs during
development.)
                > 
                > #!/opt/local/bin/perl -w
                > use strict;
                > use FileCache;
                > my $a01;
                > $a01 = 'a01file';
                > cacheout $a01;
                > print $a01 "XYZ\n";
                > 
                > 

Reply via email to