What does shift() do in Perl?

shift() is a built in Perl subroutine that takes an array as an argument, then returns and deletes the first item in that array. It is common practice to obtain all parameters passed into a subroutine with shift calls. For example, say you have a subroutine foo that takes three arguments. One way to get … Read more

How can I read documentation about built in zsh commands?

The key information for getting a more useful help utility is actually included with Zsh, it’s just a matter of finding the critical—and poorly discoverable—man page: man zshcontrib (here on the web), which describes the run-help widget: By default, run-help is an alias for the man command, so this often fails when the command word … Read more

What is the difference between a language construct and a “built-in” function in PHP?

(This is longer than I intended; please bear with me.) Most languages are made up of something called a “syntax”: the language is comprised of several well-defined keywords, and the complete range of expressions that you can construct in that language is built up from that syntax. For example, let’s say you have a simple … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)