Mega Code Archive

 
Categories / Perl / Language Basics
 

Special Variables

#!/usr/local/bin/perl -w     use English;     # Print out the process id using the standard variable.     print "PID         : Standard: $$ ";     # Print out the process id using the English value assigned.     print "English: $PROCESS_ID\n";     # Print out the real user ID using the standard variable.     print "Real User ID: Standard: $< ";     # Print out the real user id using the English value assigned.     print "English: $REAL_USER_ID\n";     # Print out the Perl version using the standard variable.     print "Perl Version: Standard: $] ";     # Print out the Perl version using the English value assigned.     print "English: $PERL_VERSION\n";