http://www.perlmonks.org?node_id=1066577

virudinesh has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: have synax error in this coding?
by marto (Cardinal) on Dec 11, 2013 at 10:01 UTC

    So you took the code I gave you yesterday, broke it and didn't take the advice? Given your previous posts are more advanced than this does this mean that you simply did a copy and paste of code from elsewhere? If you are at all interested in learning the tool you've chosen to use, stop trying things at random, stop ignoring what Perl tells you, read the documentation: perlintro, tutorials, http://learn.perl.org.

Re: have synax error in this coding?
by choroba (Cardinal) on Dec 11, 2013 at 09:33 UTC
    Read perlsyn - Perl Syntax on how to use if in Perl.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      specifically  [doc://perlintro#if] if
Re: have synax error in this coding?
by marto (Cardinal) on Dec 11, 2013 at 10:35 UTC

    Actually:

    "you run this program and check? Still there are very basic syntax errors in your program and this program will not work. You could have found out if you have executed this code"

    Reads like feedback someone has given you when you submitted this homework task.

    Update: s/tasks/task/

Re: have synax error in this coding? (teacher already told you so)
by Anonymous Monk on Dec 11, 2013 at 09:35 UTC
Re: have synax error in this coding?
by Anonymous Monk on Dec 11, 2013 at 09:40 UTC
    Ok, a quote from perlintro#if
    if ( condition ) { ... } elsif ( other condition ) { ... } else { ... }
    So the things you're missing are curly braces (not square brackets, or round parenthesis/parens)
Re: have synax error in this coding?
by taint (Chaplain) on Dec 11, 2013 at 15:08 UTC