Tag Archives: localtime

Perl – Converting the Time from 24 hr to 12 hr Format

Below is a Perl script that demonstrates how to appropriately convert the current time from 24 hr format to 12 hr format. The ‘convertToTwelveHr’ subroutine does all the work here. The 24 hr input value is passed into the subroutine … Continue reading

Posted in Perl, Programming Languages, Technology | Tagged , , , , , , , , , | Leave a comment

Scalar and List Contexts in Perl

One of the most important concepts to understand in Perl programming is that of evaluation based on context. In Perl, an operation such as an assignment or function call can give two different results based on the context of the … Continue reading

Posted in Perl, Programming Languages | Tagged , , , , , , , , , , , | Leave a comment