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