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

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



David Beck <dfbeck@sandia.gov> writes:
}I have read the several recent postings about the time formatting functions
}in timelocal.pl (warned not to use!) and Time::Local. However, I can't even
}do something as simple as getting the current system time, forget
}formatting. Example:
}
} 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.

Fix the syntax:

$currtime = time;
print "$currtime\n";

Perl isn't C.  You need the $ sign in front of a scalar variable.


}
}Any suggestions?
}
}Dave Beck
}
}

---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us



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