Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

What is this ? $^T

by Noloz (Initiate)
on May 05, 2015 at 07:37 UTC ( [id://1125682]=perlquestion: print w/replies, xml ) Need Help??

Noloz has asked for the wisdom of the Perl Monks concerning the following question:

Hello!

I recently started learning Perl. Looking at a script I have the following expression

my $rand = $^T; and I do not know what $^T means or stands for. The code continues and it generates an R file
open(Out1, “>$rand".".R"); print Out1 "source('$Bin/varNumber2Rel.R')\n"; print Out1 "varNumber2Rel('".$options{'o'}.".varNumber'".", ".$options +{'P0Cutoff'}.", ".$options{'p'}.")"; close(Out1);
I hope you can help me! Thank you!

Replies are listed 'Best First'.
Re: What is this ? $^T
by karlgoethebier (Abbot) on May 05, 2015 at 07:42 UTC

    $BASETIME

    "The time at which the program began running, in seconds since the epoch (beginning of 1970)."

    See perlvar as well as English for details.

    Edit: Links added.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

Re: What is this ? $^T
by Corion (Patriarch) on May 05, 2015 at 07:41 UTC

    perlvar lists all the variables that have special meaning in Perl.

Re: What is this ? $^T
by AnomalousMonk (Archbishop) on May 05, 2015 at 12:45 UTC

    See also from your friendly, neighborhood command line:

    c:\@Work\Perl\monks>perldoc -v "$^T" $BASETIME $^T The time at which the program began running, in seconds si +nce the epoch (beginning of 1970). The values returned by the +-M, -A, and -C filetests are based on this value.


    Give a man a fish:  <%-(-(-(-<

Re: What is this ? $^T
by vinoth.ree (Monsignor) on May 05, 2015 at 12:32 UTC

    $^T - This variable holds the start time of the program in seconds since the epoch. END { print "The program ran for ", time() - $^T, " seconds\n" }


    All is well. I learn by answering your questions...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1125682]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-04-23 11:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found