How to put data from a text file into a form input value using perl : helpers, i have a big problem here and i have tried but it seems not to comply with what i want.
I have a text file that shows a list of all the currency exchanges rates that i want to use with the update of all my currency's values. The list has a lot of white space so i wanted to create a program that will execute this.

But i need to first correct all the white spaces by the form input value. I have already got the first line of the text file content and i need this line to be inserted in the value of the input form. 
Here is my code, so far.- 

   

     #!/usr/local/bin/perl
    use strict;
    use warnings;
    
    use CGI qw(:standard);
    
    #use Data::Dumper;
    
    use CGI;
    
    my $q = CGI->new;
     
    my %data;
    
    $data{name} = $q->param('name');
    
    
    
    print header;
    
    my $file = '/admin/currencyX.txt';
    open my $info, $file or die "Could not open $file: $!";
    
    while( my $line = <$info>)  {   
        print $line,"<br>";    
        last if $. == 1;
        
       
    }
    
    
    
    
    
    print start_html('A Simple Example'),
    
        h1('A Simple Example'),
        start_form,
        "What's your value? <br>",textfield(-name =>'name', -class =>'nm', -value =>'$line'),
        
        p,
        submit(-value => 'Add', -name => 'ed'),
        end_form,
        hr;
    
    
    
    
     if ($ENV{'REQUEST_METHOD'} eq "POST"){ 
          
    #validate form here
    
    if ($data{name} eq '') {
    	print "Please provide the input";
    	exit;
     }
     
    #print "response " . Dumper \%data;
      }
    
    
    if (param()) {
        
        print 
    	"Your name is",em(param('name')),
    	
    	hr;
    }
    
      
    print end_html;
    
The text file has a similar values like :-

  

    AFN	Afghan Afghani	73.0556951371	0.0136881868
    ALL	Albanian Lek	108.3423252926	0.0092300031
    DZD	Algerian Dinar	117.9799583224	0.0084760159
    AOA	Angolan Kwanza	249.2606313396	0.0040118650
    ARS	Argentine Peso	28.2508833695	0.0353971232
    AMD	Armenian Dram	482.0941933740	0.0020742834


I need a correction to make this work fine.      