What is $ @ in Perl?

I have a Perl script that I cannot understand.

for $i(@myarr)
{
    #some stuff
    eval {
        #some stuff
    };
    if($@)
    {
        print "*** $@ ****";
    }
}
  • What does this eval do? Is this a standard Perl command or just some part?
  • What is the variable $ @ ? He is currently printing a line, but I do not know where this line is from.
+5
source share
2 answers

Suics, . English, $EVAL_ERROR $@ Try:: Tiny TryCatch , , eval . , , Perl, perldoc -f (, perldoc -f eval).

+7

$@ Perl eval, do-FILE require. , , die eval. http://perldoc.perl.org/perlvar.html

+6

All Articles