Global special variable alternative names

E

Elephant

Is there a 'use' directive I need to include in order to acess these ?

If I use

$!

in my code it runs fine, but if I use

$ERRNO

(which I would prefer, for readability) I get

H:\Perl Scripts>systest.pl
Global symbol "$ERRNO" requires explicit package name at H:\Perl
Scripts\systest
..pl line 15.
Global symbol "$ERRNO" requires explicit package name at H:\Perl
Scripts\systest
..pl line 18.
Execution of H:\Perl Scripts\systest.pl aborted due to compilation
errors.

It's not just $ERRNO I cannot access - none of the others (eg $PID,
$CHILD_ERROR) work either whereas the short versions ( $$, $? ) work
fine.

I am using Active Perl v5.6.1
 
B

Ben Morrow

Is there a 'use' directive I need to include in order to acess these ?

If I use

$!

in my code it runs fine, but if I use

$ERRNO

(which I would prefer, for readability) I get

perldoc perlvar

Ben
 
W

Web Surfer

[This followup was posted to comp.lang.perl.misc]

Is there a 'use' directive I need to include in order to acess these ?

If I use

$!

in my code it runs fine, but if I use

$ERRNO

(which I would prefer, for readability) I get

H:\Perl Scripts>systest.pl
Global symbol "$ERRNO" requires explicit package name at H:\Perl
Scripts\systest
.pl line 15.
Global symbol "$ERRNO" requires explicit package name at H:\Perl
Scripts\systest
.pl line 18.
Execution of H:\Perl Scripts\systest.pl aborted due to compilation
errors.

It's not just $ERRNO I cannot access - none of the others (eg $PID,
$CHILD_ERROR) work either whereas the short versions ( $$, $? ) work
fine.

I am using Active Perl v5.6.1


I believe that you need to do the following :

use English;
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top