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.
#!/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 = <STDIN>;
sleep 1;
if ("$name" eq "jake")
{
Granted
}
}
Access