- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Perl says reserverd word "our" is deprecated
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 07:31 AM
тАО08-14-2002 07:31 AM
I'm trying to use Clay's fileage.pl script as posted in:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe26442308663d611abdb0090277a778c,00.html
I'm using Perl 5.005_03 on HPUX 11.0 and get the following messages:
Use of reserved word "our" is deprecated at /usr/local/adm/fileage.pl line 72.
Global symbol "$opt_m" requires explicit package name at /usr/local/adm/fileage.pl line 72.
Global symbol "$opt_a" requires explicit package name at /usr/local/adm/fileage.pl line 72.
Global symbol "$opt_c" requires explicit package name at /usr/local/adm/fileage.pl line 72.
Global symbol "$opt_s" requires explicit package name at /usr/local/adm/fileage.pl line 72.
Global symbol "$opt_v" requires explicit package name at /usr/local/adm/fileage.pl line 72.
Execution of /usr/local/adm/fileage.pl aborted due to compilation errors.
Probably elementary to you, but Greek to me.
Thanks,
Darrell
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 07:46 AM
тАО08-14-2002 07:46 AM
SolutionYou really should upgrade to at least 5.6.x; you can download a binary version from:
http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.6.1/; it's just a swinstall and is very easy.
By the way, I have a leter version of that script which will output the age of a file in epoch seconds via the -e option.
Invoke it as fileage.pl w/o arguments to display usage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:35 AM
тАО08-14-2002 08:35 AM
Re: Perl says reserverd word "our" is deprecated
as already pointed out your Perl version seems dated.
The "our" declaration for global variables was only introduced from Perl 5.6.0 onwards.
If you have to stick with your "old" Perl version then you could try to declare the globals with the "vars" pragma:
e.g.
use vars qw($opt_a $opt_c $opt_m $opt_s $opt_v);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:37 AM
тАО08-14-2002 08:37 AM
Re: Perl says reserverd word "our" is deprecated
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:38 AM
тАО08-14-2002 08:38 AM
Re: Perl says reserverd word "our" is deprecated
Thanks for the reply. I had already changed the "shebang" to point to my version of Perl. I kinda expected an "upgrade Perl" answer though.
I installed 5.6.1 from the June applications cd and things are fine now.
Oh... thanks for the updated script.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-14-2002 08:41 AM
тАО08-14-2002 08:41 AM
Re: Perl says reserverd word "our" is deprecated
Ralph, you're welcome for the new hat! I see I put you over 500. Congratulations!
Darrell