Can any provide some help? I am getting this error: edm01:/usr/local/bin/perl>> perl -c tape_rotation_vaulting.pl String found where operator expected at tape_rotation_vaulting.pl line 64, near" (Do you need to predeclare TWENTYONEDAYS_STRING?) syntax error at tape_rotation_vaulting.pl line 64, near "TWENTYONEDAYS_STRING "" tape_rotation_vaulting.pl had compilation errors.
I want to be able to print the string "There are xxxxx seconds in 21 days" xxxx would come from the constant TWENTYONEDAYS_STRING. thanks! ## Set pragmas # use strict; # use diagnostics; ## Set variables #my $twenty_one_days="/usr/local/log/21days.log"; #my $thiry_days="/usr/local/log/30days.log"; #my $ninety_one_days="/usr/local/log/91days.log"; my $default="/usr/local/log/edmdefault.log"; my $twenty_one_days_LnotesFS="/usr/local/log/LnotesFS.log"; my $lvimg_L_Drive="/usr/local/log/lvimg_L_Drive.log"; my $lvimg_K_Drive="/usr/local/log/lvimg_K_Drive.log"; my $lvimg_JI_Drives="/usr/local/log/lvimg_JI_Drives.log"; my $lvimg_GH_Drives="/usr/local/log/lvimg_GH_Drives.log"; my $lvimg_FE_Drives="/usr/local/log/lvimg_FE_Drives.log"; my $lvimg_DC_Drives="/usr/local/log/lvimg_DC_Drives.log"; ## Below are SC clients #my $idxsql="/usr/local/log/idxsql.log"; #my $ORBaplog="/usr/local/log/ORBaplog.log"; #my $ORBDsch="/usr/local/log/ORBDsch.log"; #my $ORBmodel="/usr/local/log/ORBmodel.log"; #my $ORBmsdb="/usr/local/log/ORBmsdb.log"; #my $ORBOHusr="/usr/local/log/ORBOHusr.log"; #my $ORBPo="/usr/local/log/ORBPo.log"; #my $ORBPr="/usr/local/log/ORBPr.log"; #my $ORB="/usr/local/log/ORB.log"; system ("clear"); ## Epoch time == 21,30 and 91 ## Define global constants use constant TWENTYONEDAYS_STRING => 60 * 60 * 24 * 21; use constant THIRTYDAYS_STRING => 60 * 60 * 24 * 30; use constant NINETYONEDAYS_STRING => 60 * 60 * 24 * 91; # use constant THIRTYDAYS_STRING => localtime(time + 2592000); # use constant NINETYONEDAYS_STRING => localtime(time + 7862400); &timing; sub timing { local $now_string = localtime; print $now_string, "\n"; print "\n"; printf "There are ", TWENTYONEDAYS_STRING "seconds in 21 days"; print "\n"; } Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams