On 2005.5.18, at 09:53 PM, Lola Lee wrote:

[...]
Now, $! . . . what does this do? I looked in perldebtut and it says that "!" means, redo a previous command, but what is the purpose of "$"? And, where should I be putting this in, again?

Just so this doesn't get lost in the wash, $! is a special variable. (Has nothing to do with the "!" command explained in perldebtut.) The contents of the special variable "$!" is the text version of the error message of the last error which occurred.


There's a whole swarm of these special variables that use the $ sign with punctuation, including $_ . There are even some that are hashes or arrays, rather than scalars, and begin with % or @ instead of $.

For more information, type

    perldoc perlvar

at the command line.



Reply via email to