[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] time functions with MacPerl 5.1.3.r2



At 09.38 8/14/97, David Beck wrote:
> currtime = time();
>
>When I try to use this statement I end up with an MacPerl error of:
>
># Can't modify constant item in scalar assignment, near ");"
>File '<AppleEvent>'; Line 3
># Execution of <AppleEvent> aborted due to compilation errors.
>
>Any suggestions?

Yeah.  Make currtime into a scalar variable:

  $currtime = time();

In Perl, scalar variables MUST have the $ designation.  Arrays (@) and
hashes (%) and globs (*) also must have the proper designation.

If you are new to Perl, I suggest purchasing the newly-revised Learning
Perl from O'Reilly & Associates.  It goes over all the basics very well.

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch