For example, you might place an assignment statement inside an if statement block that belongs outside the block. Or you might have a loop that runs from 0 to 100 when it should run from 10 to 100. Accidentally deleting the 1 or not entering it in the first place is very easy. Syntax errors are usually easy to fix. You'll see how to decipher some of Perl's error messages.
Logic errors can be very hard to fix.
While there is no magic wand to wave over a program that will identify logic errors, there are some tools that can help-like the debugger. A debugger is an environment that lets you execute your program line by line. This is also called single-stepping through your program. You can also display or modify the value of variables.