Knowledgebase

PERL Date command

I am adapting a PERL script to fit my website, and I need a 'path to the Date command' to generate a date.

The script uses these: $date_command = "/usr/bin/datetime"; # Get the Date for Entry $date = `$date_command +"%A, %B %d, %Y at %T (%Z)"`; chop($date); $shortdate = `$date_command +"%D %T %Z"`; chop($shortdate);

What should I use for the date_command as I have no PERL experience.

If you are looking for PERL commands then firstly, you can see which PERL modules are installed on your server by clicking on the "Installed Perl Modules" => click to view link from within Cpanel.

You can also find bundles of info in google simply by searching for things like "linux perl date_command" Also, the path to PERL may also need adjusting but the path to PERL is also listed on the front page of your Cpanel under "Information" down the left hand side.

The current path to perl is "usr/bin/perl" and for the date command you may want to try: $date_command = "/bin/date";

  • 1 Users Found This Useful

Was this answer helpful?

Related Articles

Creating PHPinfo files

When you first setup your hosting account with you you will probably want to see whats available,...

Naming your homepage

Naming your Website Homepage. Is there a certain name I need to give to my Home Page? You need...

Useful META TAGS

Note the keywords "HTTP-EQUIV", "Name" and "Content" are case-insensitive. Their values are also...

Using MP3 Files on your website

If you wish to use .mp3 files within your website then please read this carefully as we do check...