title: Perl Fahrenheit to Celsius conversion and vice-versa
body: <p>I have the question in Perl:
  To write a Perl script which will ask the user for a temperature and then ask whether it is to be converted to degree Celius or Fahrenheit. Perform the conversion and display the answer. The equations for temperature conversion are:</p>
  
  <pre><code>1) Celsius to Fahrenheit:C=(F-32) x 5/9
  2) Fahrenheit to Celsius:F=9C/5 + 32
  </code></pre>
  
  <p>My script is:</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  print "Enter the temperature: ";
  my $temp = &lt;STDIN&gt;;
  print "Enter the Conversion to be performed:";
  my $conv = &lt;STDIN&gt;;
  my $cel;
  my $fah;
  
  if ($conv eq 'F-C') {
  
     $cel = ($temp - 32) * 5/9;
     print "Temperature from $fah degree Fahrenheit is $cel degree Celsius";
  }
  
  if ($conv eq 'C-F') {
  
      $fah = (9 * $temp/5) + 32;
      print "Temperature from $cel degree Celsius is $fah degree Fahrenheit"; 
  }
  </code></pre>
  
  <p>After I enter $temp and $conv from the keyboard, blank output will appear.Where am I going wrong? Please help. Thanks in advance.</p>