Does $^T still work ?

N

Nick Weavers

$BASETIME (or $^T) seems to have stopped working for me. I have tested it on
RH linux 9.0 with perl 5.8.0 and under AIX 5.1 with perl 5.6.0 and it
returns nothing.

Does perl have to be compiled with any options enabled for this builtin var
to work?

Nick.
 
J

J. Gleixner

Nick said:
$BASETIME (or $^T) seems to have stopped working for me. I have tested it on
RH linux 9.0 with perl 5.8.0 and under AIX 5.1 with perl 5.6.0 and it
returns nothing.

Does perl have to be compiled with any options enabled for this builtin var
to work?

Nick.

BASETIME is defined in English.pm.

use English;
print $BASETIME;
 
D

David Efflandt

$BASETIME (or $^T) seems to have stopped working for me. I have tested it on
RH linux 9.0 with perl 5.8.0 and under AIX 5.1 with perl 5.6.0 and it
returns nothing.

Does perl have to be compiled with any options enabled for this builtin var
to work?

Following works for me:

#!/usr/bin/perl -w
sleep 5;
print "This script took ". (time - $^T) .
" seconds in Perl $] on $^O\n";

Depending upon the system, returns one of:
This script took 5 seconds in Perl 5.006001 on linux
This script took 5 seconds in Perl 5.008 on linux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top