Do you know where your variables are? | |
PerlMonks |
Convert weekday to numerical dateby james28909 (Deacon) |
on Apr 29, 2017 at 03:23 UTC ( [id://1189144]=perlquestion: print w/replies, xml ) | Need Help?? |
james28909 has asked for the wisdom of the Perl Monks concerning the following question: Hello again wise monks :) I have a list of weekdays:
I need to format these weekdays into an absolute numerical date based off of scalar localtime. eg:
I need to use $local_weekday and $local_numerical_date (eg. 'fri 28') to format @weekdays from the list. eg. 'wednesday' to eg. '26'. Also, i never need to check what the numerical date in the future is, it is always current date or earlier. I am pretty sure there is a way to loop while subtracting but I cant figure it out lol. If I can be any more clear on anything please let me know. I have tried to explain it the best i can :) EDIT: changed 'wednesday 27' to just '27' and added 'Yesterday' would be '27' to __END__
Back to
Seekers of Perl Wisdom
|
|