Submitted Questions

  • Perl Code

    1) Input ip address. Check if it is in the range 172.125.1.0 and 172.125.25.0 using only regular expressions in Perl. Do not use parse functions. 2) Input a name. Check if it is valid (has at-least 3 letters and one vowel) using only return functions and regular expressions in Perl. Do not use parse functions. 3) Input email address. Check if it is valid using return function and regular expressions...

    praveen

    • Nov 29th, 2016

    $ip=;
    chomp($ip);
    if ($ip =~ /^172.125.([1-9]|1[1-9]|2[1-5]).0/){print "$ip in range
    " ;}
    else{print "$ip not in range
    "};