How to do an if statement in perl? : <p>Having a problem with if statement in Perl, my if statement is not working. What am I doing wrong, because I'm using strict and warnings module, but still my if statement is not working.</p>

<pre><code>#!/usr/bin/env perl

use strict;
use warnings;


sub Granted
{
    print "\n\nAccess Granted\n\n";
}


sub Access
{
    print "\n\n\n\n";
    sleep 1;
    print "Enter your name: ";
    my $name = &lt;STDIN&gt;;
    sleep 1;

    if ("$name" eq "jake")
    {
        Granted
    }

}

Access 
</code></pre>
