Hi,

what's the difference between do a block and eval a block?

sub test {
    my $bl = shift;
    eval $bl;
    # do $bl;
}

test { print "hello\n" };

from the code, I see both do and eval work the same.

Thanks.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to