Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Okay. Now compare:

    die "You may only use port numbers 1024 and higher"
        unless $port >= 1024 || is_root(current_uid());

    die "Port numbers 1024 are forbidden"
        if $port < 1024 && !is_root(current_uid());


My head hurts! Does unless apply to both branches or just one. The if example is easier for sure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: